From 5aa944a184afa23481a5db2c53f9de8e7d9ce326 Mon Sep 17 00:00:00 2001 From: Jason Chan Date: Wed, 5 Jan 2022 16:54:57 +0000 Subject: SERVER-61923 Fix bug where consistency checker can mask error due to ignoring inconsistency in image collections (cherry picked from commit e2d48665f771a82bfe7de2a112276cd3692a6007) --- src/mongo/shell/data_consistency_checker.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/mongo/shell/data_consistency_checker.js b/src/mongo/shell/data_consistency_checker.js index 3edfd56a663..d91c93ebaae 100644 --- a/src/mongo/shell/data_consistency_checker.js +++ b/src/mongo/shell/data_consistency_checker.js @@ -335,7 +335,13 @@ var {DataConsistencyChecker} = (function() { collectionPrinted, sourceCollInfos, syncingCollInfos, collName); const shouldIgnoreFailure = this.canIgnoreCollectionDiff(sourceCollInfos, syncingCollInfos, collName); - success = shouldIgnoreFailure; + if (shouldIgnoreFailure) { + prettyPrint( + `Collection diff in ${dbName}.${collName} can be ignored: ${dbHashesMsg} + . Inconsistencies in the image collection can be expected in certain + restart scenarios.`); + } + success = shouldIgnoreFailure && success; } }); -- cgit v1.2.1