[SERVER-21762] Change dbHash output based on non-existence of db Created: 03/Dec/15  Updated: 05/Apr/17  Resolved: 12/Jul/16

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Scott Hernandez (Inactive) Assignee: Robert Guo (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Sprint: TIG 13 (04/22/16), TIG 14 (05/13/16), TIG 15 (06/03/16), TIG 16 (06/24/16), TIG 17 (07/15/16)
Participants:
Linked BF Score: 0

 Description   

If the database doesn't exist the dbhash output should have a clear indication of that, possible like this:

{  host: "mci-osx108.build.10gen.cc:20011",
   md5: false, // for compat.
   missing: true, // indication it is missing and doesn't exist
...}

Adding this additional information will allow the test framework to distinguish when a db exists or not on a replica, independent of storage engine impl. Right now we cannot detect some types of replication failures using dbhash.



 Comments   
Comment by Robert Guo (Inactive) [ 12/Jul/16 ]

closing as "works as designed". The design is that db's are not guaranteed to exist on all replicaset nodes, so adding the "exists" field provides no additional value.

Comment by Robert Guo (Inactive) [ 12/Jul/16 ]

It is possible for some databases that only have a non-replicable collection (e.g. system.profile) to exist on a subset of nodes in a replicaset. So we can't guarantee that the database exists on all nodes under all circumstances.

The only things that we can guarantee are
1. the database should not exist on any node immediately after doing a
dropDatabase()
2. the database should not exist on any node if no system.profile (or other
non-replicable collection) has ever been created on it.

These guarantees requires tracking state, so it's tricky to include them in the output of the dbhash command.

For replicable system collections, they have been added to dbhash as part of SERVER-22744. This is likely as close as we can get to asserting that system collections in databases are replicated correctly.

Generated at Thu Feb 08 03:58:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.