-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Labels:None
Description
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.)
- documents
-
SERVER-30357 Allow users to run the validate cmd with {background:true}
- Closed
-
SERVER-43134 Only run background validation on check-pointed tables
- Closed
- is duplicated by
-
DOCS-12961 Investigate changes in SERVER-42768: uassert if the storage engine does not support checkpoints when running validate with { background: true }
- Closed
-
DOCS-13031 Investigate changes in SERVER-43134: Only run background validation on check-pointed tables
- Closed
- related to
-
DOCS-12958 Investigate changes in SERVER-42224: Add a server parameter maxValidateMBPerSec to specify max validate throughput per validate command in order to limit I/O and CPU usage
- Closed
-
DOCS-13058 Investigate changes in SERVER-43644: validate() in shell/collections.js should only accept an object, not also a boolean which is interpreted as the 'full' option
- Closed
-
DOCS-13681 Undocument background : true
- Closed