diff options
author | Ali Mir <ali.mir@mongodb.com> | 2020-04-13 17:55:35 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-04-22 00:15:51 +0000 |
commit | c593d0fb6eec6b4f3c7ae02a5c3de73ad6e3af95 (patch) | |
tree | aaecd6b4136dfb4fb54e5d4d7d04f526cb982166 /src/mongo/db/commands/dbhash.cpp | |
parent | cc814e4c87c1ae20ef7c0840344496043dbdf18d (diff) | |
download | mongo-c593d0fb6eec6b4f3c7ae02a5c3de73ad6e3af95.tar.gz |
SERVER-46323 Update FCV constants throughout server code following 4.4 branch
SERVER-46589 Update Execution-related generic upgrade/downgrade references
SERVER-46587 Update Replication-related generic upgrade/downgrade references
SERVER-46839 Update Sharding-related generic upgrade/downgrade references
SERVER-46590 Update Query-related generic upgrade/downgrade references
SERVER-46318 Bump wire protocol version for 4.6
SERVER-46313 Bump Powercycle FCV
Diffstat (limited to 'src/mongo/db/commands/dbhash.cpp')
-rw-r--r-- | src/mongo/db/commands/dbhash.cpp | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/src/mongo/db/commands/dbhash.cpp b/src/mongo/db/commands/dbhash.cpp index 0f867bc0a30..90b55043905 100644 --- a/src/mongo/db/commands/dbhash.cpp +++ b/src/mongo/db/commands/dbhash.cpp @@ -230,32 +230,8 @@ public: return false; } - // Only hash replicated collections. In 4.4 we use a more general way of choosing what - // collections are replicated. This means that mixed 4.2-4.4 replica sets could hash the - // same database differently, even when all nodes are up-to-date. We only use the new - // method for choosing collections to hash in FCV 4.4 so that when all nodes are - // up-to-date, it is guaranteed that they hash the same set of collections. - if (serverGlobalParams.featureCompatibility.getVersion() == - ServerGlobalParams::FeatureCompatibility::Version::kFullyUpgradedTo44) { - if (repl::ReplicationCoordinator::isOplogDisabledForNS(collNss)) { - return true; - } - } else { - // A set of 'system' collections that are replicated, and therefore included in the - // db hash. - const std::set<StringData> replicatedSystemCollections{"system.backup_users", - "system.js", - "system.new_users", - "system.roles", - "system.users", - "system.version", - "system.views"}; - // Only include 'system' collections that are replicated. - bool isReplicatedSystemColl = - (replicatedSystemCollections.count(collNss.coll().toString()) > 0); - if (collNss.isSystem() && !isReplicatedSystemColl) { - return true; - } + if (repl::ReplicationCoordinator::isOplogDisabledForNS(collNss)) { + return true; } if (collNss.coll().startsWith("tmp.mr.")) { |