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

Docs for SERVER-7326: "validate" command should perform full index validation

      Engineering Ticket Description:

      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.

            Assignee:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Reporter:
            emily.hall Emily Hall
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              1 year, 24 weeks, 2 days ago