diff options
author | Rishab Joshi <rishab.joshi@mongodb.com> | 2022-08-12 15:38:54 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-08-23 21:07:02 +0000 |
commit | 9ca61a6d178ec3bb2fe46c93e31c6ac3a503c75d (patch) | |
tree | 9445294b6ad483ffbe4723f10d0ad7f64989ea0d /src/mongo/db/commands | |
parent | 9d47a813c02607ff8fb4fbc50b544ebeb494ce85 (diff) | |
download | mongo-9ca61a6d178ec3bb2fe46c93e31c6ac3a503c75d.tar.gz |
SERVER-67634 Ensure that change collections are never used on config
servers.
Diffstat (limited to 'src/mongo/db/commands')
-rw-r--r-- | src/mongo/db/commands/run_aggregate.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/commands/run_aggregate.cpp b/src/mongo/db/commands/run_aggregate.cpp index 981a692634e..acc2597af08 100644 --- a/src/mongo/db/commands/run_aggregate.cpp +++ b/src/mongo/db/commands/run_aggregate.cpp @@ -763,6 +763,12 @@ Status runAggregate(OperationContext* opCtx, nss = NamespaceString::makeChangeCollectionNSS(origNss.tenantId()); } + // Assert that a change stream on the config server is always opened on the oplog. + tassert(6763400, + str::stream() << "Change stream was unexpectedly opened on the namespace: " + << nss << " in the config server", + serverGlobalParams.clusterRole != ClusterRole::ConfigServer || nss.isOplog()); + // If the 'assertChangeStreamNssCollection' failpoint is active then ensure that we are // opening the change stream on the correct namespace. if (auto scopedFp = assertChangeStreamNssCollection.scoped(); |