summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Golfieri <enrico.golfieri@mongodb.com>2022-11-24 16:07:27 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-11-24 16:36:32 +0000
commit99c3c2646023945d95df954078a334a80b413077 (patch)
tree910b202a0f87a3991fa227ee3451a2ed92b153d3
parent86dc934a4ede56e140d70fcb39b0460c148dbc9a (diff)
downloadmongo-99c3c2646023945d95df954078a334a80b413077.tar.gz
SERVER-71277 Not assume that '_collInfo' is initialized when we hit an error at '_runImpl' from 'collmod_coordinator.cpp'
-rw-r--r--src/mongo/db/s/collmod_coordinator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/s/collmod_coordinator.cpp b/src/mongo/db/s/collmod_coordinator.cpp
index 277e2dc3f02..f3dba24ecb0 100644
--- a/src/mongo/db/s/collmod_coordinator.cpp
+++ b/src/mongo/db/s/collmod_coordinator.cpp
@@ -382,7 +382,7 @@ ExecutorFuture<void> CollModCoordinator::_runImpl(
"error"_attr = redact(status));
// If we have the collection UUID set, this error happened in a sharded collection,
// we should restore the migrations.
- if (_doc.getCollUUID()) {
+ if (_doc.getCollUUID() && _collInfo) {
auto opCtxHolder = cc().makeOperationContext();
auto* opCtx = opCtxHolder.get();
getForwardableOpMetadata().setOn(opCtx);