summaryrefslogtreecommitdiff
path: root/src/mongo/shell/data_consistency_checker.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/shell/data_consistency_checker.js')
-rw-r--r--src/mongo/shell/data_consistency_checker.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mongo/shell/data_consistency_checker.js b/src/mongo/shell/data_consistency_checker.js
index 3a1621b11de..b3303c76857 100644
--- a/src/mongo/shell/data_consistency_checker.js
+++ b/src/mongo/shell/data_consistency_checker.js
@@ -370,6 +370,28 @@ var {DataConsistencyChecker} = (function() {
delete syncingInfo.idIndex.ns;
}
+ // If the servers are using encryption and they specify an encryption option
+ // in versions <7.2 this is stored on the primary but not the secondary.
+ // This is not an actual failure since the data is correct on all nodes. We
+ // can safely ignore this element in the configString.
+ const encryptionRegex = /encryption=\(?[^)]*\),?/;
+
+ if (sourceInfo.options && sourceInfo.options.storageEngine &&
+ sourceInfo.options.storageEngine.wiredTiger &&
+ sourceInfo.options.storageEngine.wiredTiger.configString) {
+ sourceInfo.options.storageEngine.wiredTiger.configString =
+ sourceInfo.options.storageEngine.wiredTiger.configString.replace(
+ encryptionRegex, "");
+ }
+
+ if (syncingInfo.options && syncingInfo.options.storageEngine &&
+ syncingInfo.options.storageEngine.wiredTiger &&
+ syncingInfo.options.storageEngine.wiredTiger.configString) {
+ syncingInfo.options.storageEngine.wiredTiger.configString =
+ syncingInfo.options.storageEngine.wiredTiger.configString.replace(
+ encryptionRegex, "");
+ }
+
if (!bsonBinaryEqual(syncingInfo, sourceInfo)) {
prettyPrint(
`the two nodes have different attributes for the collection or view ${