Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-24173

dbhash should check and/or return indexes in its reply

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Diagnostics, Replication
    • None
    • Storage Execution

      dbHash should, in addition to checking collection data, also check the indexes. Even if the indexes aren't taken into consideration when performing the hash, we should still return the indexes in the return document so that the user can verify that each member of a replica set has the same indexes.

      (Of course, it's possible for replica set members to have different indexes; e.g. when performing a rolling index upgrade. But in the "normal" use case, where the user doesn't circumvent the replication system, it's expected that all the indexes will be the same.)

      Original Description

      dbhash provides a way to verify that replicas have the same data.
      How about having a similar check for the indexes.
      Walk an index, calculating a hash value on the index keys.

      An overall value for all indexes of a given collection would be a quick check to see that all indexes are identically built, and that the collection does not have a different number of indexes for a given collection.

      In rare situations, some users want a different number of indexes, so for that purpose and for the purpose of identifying which index differ we may need to show:

      • hash per index
      • hash for all indexes on a collection
      • hash for all indexes on a database

            Assignee:
            backlog-server-execution [DO NOT USE] Backlog - Storage Execution Team
            Reporter:
            daniel.coupal@mongodb.com Daniel Coupal
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: