diff options
author | Misha Tyulenev <misha.tyulenev@mongodb.com> | 2020-07-10 16:09:20 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-07-10 16:39:11 +0000 |
commit | a2d9dc67ad1a1efb700f51e90c52fbf2684abe8a (patch) | |
tree | a003b540b10b0f980008c42eb6c7c28a66c75de8 /src/mongo/db | |
parent | 15588728dce3ec74e574887f0b7f2775e7119bf6 (diff) | |
download | mongo-a2d9dc67ad1a1efb700f51e90c52fbf2684abe8a.tar.gz |
SERVER-49086 follow-up: exclude system unsharded collections from MovePrimaryInProgress failure
Diffstat (limited to 'src/mongo/db')
-rw-r--r-- | src/mongo/db/s/op_observer_sharding_impl.cpp | 4 |
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) { |