summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMisha Tyulenev <misha.tyulenev@mongodb.com>2020-07-10 16:09:20 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-07-10 16:39:11 +0000
commita2d9dc67ad1a1efb700f51e90c52fbf2684abe8a (patch)
treea003b540b10b0f980008c42eb6c7c28a66c75de8
parent15588728dce3ec74e574887f0b7f2775e7119bf6 (diff)
downloadmongo-a2d9dc67ad1a1efb700f51e90c52fbf2684abe8a.tar.gz
SERVER-49086 follow-up: exclude system unsharded collections from MovePrimaryInProgress failure
-rw-r--r--src/mongo/db/s/op_observer_sharding_impl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/s/op_observer_sharding_impl.cpp b/src/mongo/db/s/op_observer_sharding_impl.cpp
index 01d5d5e1c91..3197e680080 100644
--- a/src/mongo/db/s/op_observer_sharding_impl.cpp
+++ b/src/mongo/db/s/op_observer_sharding_impl.cpp
@@ -81,6 +81,10 @@ bool isMigratingWithCSRLock(CollectionShardingRuntime* csr,
}
void assertMovePrimaryInProgress(OperationContext* opCtx, NamespaceString const& nss) {
+ if (!nss.isNormalCollection()) {
+ return;
+ }
+
Lock::DBLock dblock(opCtx, nss.db(), MODE_IS);
auto dss = DatabaseShardingState::get(opCtx, nss.db().toString());
if (!dss) {