Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-13157

Investigate changes in SERVER-30357: Allow users to run the validate cmd with {background:true}

      Description

      Downstream Change Summary

      The validate cmd can now run {background:true}. The default for the background parameter is false. {background:true} and {full:true} are incompatible: only one or the other may be true in a single cmd.

      Background validation can run concurrently with CRUD and DDL operations. It periodically yields locks to allow CRUD and DDL ops to run concurrently, and will return an error if the collection or an index is dropped that it is validating.

      Background validation only runs on checkpoint'ed data, which is only supported by the 'wiredTiger' storage engine, and so background validation is only supported on the 'wiredTiger' storage engine.

      If a collection has not yet been checkpoint'ed, then the validate cmd benignly returns ok:1 with valid:true and only a warning in the 'warning' field.

      If an index is too newly created to have been checkpoint'ed, then validate w/ background:true will ignore it (won't run validation on it). If an index has been checkpoint'ed, but dropped and the drop hasn't yet been checkpoint'ed, then that index will be ignored as well: no point validating a dropped index.

      Description of Linked Ticket

      Instead of the existing code

      background = false;

      in validate.cpp, we will parse the user cmd request's "background" field and initialize it with that value. If unspecified, "background" defaults to false. SERVER-42223 will set up the code to act on background==false.

      Additionally, return an error if {full:true} is specified along with {background:true}.

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

            Assignee:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Reporter:
            backlog-server-pm Backlog - Core Eng Program Management Team
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              3 years, 44 weeks, 1 day ago