[SERVER-53854] checkReplicatedDataHashes() may return without throwing despite detecting a dbhash mismatch Created: 16/Jan/21  Updated: 29/Oct/23  Resolved: 21/Jan/21

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

Type: Bug Priority: Critical - P2
Reporter: Max Hirschhorn Assignee: Xuerui Fa
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
is caused by SERVER-50935 Expand dbhash checks to ensure two re... Closed
Related
related to SERVER-53855 Resharding recipient secondaries igno... Closed
is related to SERVER-33068 run_check_repl_dbhash.js hook exits w... Closed
is related to SERVER-37197 Validation failure does not cause tes... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2021-01-25
Participants:

 Description   

The changes from c1889f6 as part of SERVER-50935 allow success to transition from false back to true upon checking the dbhash of the subsequent database or subsequent secondary.

for (const dbName of combinedDBs) {
    ...
    dbHashes.secondaries.forEach(secondaryDBHash => {
        ...
        print(
            `checking db hash between primary: ${primary} and secondary ${secondary}`);
        success = DataConsistencyChecker.checkDBHash(primaryDBHash,
                                                      primaryCollInfos,
                                                      secondaryDBHash,
                                                      secondaryCollInfos,
                                                      msgPrefix,
                                                      ignoreUUIDs,
                                                      hasSecondaryIndexes,
                                                      collectionPrinted);
        ...
    });
}
 
assert(success, 'dbhash mismatch between primary and secondary');


I was seeing the following log message in a local resharding fuzzer run, but the test wasn't failing as a result.

[js_test:resharding_fuzzer-b3454-1610836920400-0] 2021-01-16T22:42:30.203+0000 checkReplicatedDataHashes, the two nodes have a different hash for the collection config.transactions: source: {
...
[executor:js_test:job0] 2021-01-16T22:43:40.920+0000 resharding_fuzzer-b3454-1610836920400-0.js ran in 85.50 seconds: no failures detected.



 Comments   
Comment by Githook User [ 21/Jan/21 ]

Author:

{'name': 'XueruiFa', 'email': 'xuerui.fa@mongodb.com', 'username': 'XueruiFa'}

Message: SERVER-53854: Ensure checkReplicatedDataHashes remembers previous dbhash mismatches
Branch: master
https://github.com/mongodb/mongo/commit/604c2176e1715f8ce3f407ef4771a23c708d49b2

Generated at Thu Feb 08 05:32:02 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.