-
Type: New Feature
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Admin, Index Maintenance
-
None
-
Fully Compatible
-
Query 2.7.8, TIG 10 (02/19/16), TIG 11 (03/11/16), TIG 12 (04/01/16), TIG 13 (04/22/16), TIG 14 (05/13/16)
If a user tries to use the validate command to validate an index, it sort of works, but it generates errors in the server log and incorrectly reports that the index has failed validation.
By "sort of works", I mean that it correctly lists the extents used by the index and correctly reports the datasize and last extent size. It incorrectly reports the number of btree buckets as the number of records. It also generates multiple errors logged on the server and incorrectly provides "advice" : "ns corrupt, requires repair".
It is easy to know that the specified collection is actually an index and to validate it as an index instead of as a normal collection. The validate() command (without
{ full : true }) should return correct and useful information.
The command "db.indexName.validate(true)" should validate that the index entries actually point to valid records. We currently have no function that does this, and it is not done by "db.collection.validate(true)", presumably because it would be an expensive operation. This would be a very useful addition to the set of available diagnostic features.
- depends on
-
SERVER-23050 Add full index validation for the _id index
- Closed
- is duplicated by
-
SERVER-10673 running validate() on index as namespace crashes server
- Closed
-
SERVER-23051 Add full index verification dbtests
- Closed
-
SERVER-23052 add full index verification for sparse and ttl indexes
- Closed
-
SERVER-23054 add full index verification for partial index
- Closed
-
SERVER-23056 add full index verification to compound index
- Closed
-
SERVER-23057 add full index verification to multikey index
- Closed
- is related to
-
SERVER-14584 BtreeLogic::Builder generates an invalid Btree
- Closed
-
SERVER-19521 validate should check consistency of number of index entries
- Closed
-
SERVER-9488 Validate should check more than logical collection/index data
- Closed
- related to
-
SERVER-23740 validate() should check index key ordering
- Closed