-
Type:
Improvement
-
Resolution: Done
-
Priority:
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
- related to
-
SERVER-24205 Replicated dbhash command
-
- Backlog
-