summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
authorPaolo Polato <paolo.polato@mongodb.com>2022-06-20 07:44:16 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-10-14 13:34:32 +0000
commitceeb5b9847174009b8a6ea478ae6a8f3bd6eec40 (patch)
tree95151d4d5fd59d5335d62db381bd24da1441cf90 /src/mongo/db
parent9f9fd512dd725cdf9bc24baeba77b9123724e95f (diff)
downloadmongo-ceeb5b9847174009b8a6ea478ae6a8f3bd6eec40.tar.gz
SERVER-67346 Disable autosplit on config.system.sessions when upgrading the cluster
Diffstat (limited to 'src/mongo/db')
-rw-r--r--src/mongo/db/s/balancer/balancer.cpp5
-rw-r--r--src/mongo/db/s/sessions_collection_config_server.cpp6
2 files changed, 6 insertions, 5 deletions
diff --git a/src/mongo/db/s/balancer/balancer.cpp b/src/mongo/db/s/balancer/balancer.cpp
index 4101c38684b..ac1ef7b5c01 100644
--- a/src/mongo/db/s/balancer/balancer.cpp
+++ b/src/mongo/db/s/balancer/balancer.cpp
@@ -1136,9 +1136,8 @@ SharedSemiFuture<void> Balancer::applyLegacyChunkSizeConstraintsOnClusterData(
NamespaceString::kLogicalSessionsNamespace,
0,
boost::none /*defragmentCollection*/,
- boost::none /*enableAutoSplitter*/);
- } catch (const ExceptionFor<ErrorCodes::ConflictingOperationInProgress>&) {
- // TODO SERVER-66915 replace caught error code with NamespaceNotSharded
+ false /*enableAutoSplitter*/);
+ } catch (const ExceptionFor<ErrorCodes::NamespaceNotSharded>&) {
// config.system.collections does not appear in config.collections; continue.
}
diff --git a/src/mongo/db/s/sessions_collection_config_server.cpp b/src/mongo/db/s/sessions_collection_config_server.cpp
index 1ce87298a59..7c33603a199 100644
--- a/src/mongo/db/s/sessions_collection_config_server.cpp
+++ b/src/mongo/db/s/sessions_collection_config_server.cpp
@@ -118,8 +118,10 @@ void SessionsCollectionConfigServer::setupSessionsCollection(OperationContext* o
auto filterQuery =
BSON("_id" << NamespaceString::kLogicalSessionsNamespace.ns()
<< CollectionType::kMaxChunkSizeBytesFieldName << BSON("$exists" << false));
- auto updateQuery =
- BSON("$set" << BSON(CollectionType::kMaxChunkSizeBytesFieldName << kMaxChunkSizeBytes));
+ auto updateQuery = BSON("$set" << BSON(CollectionType::kMaxChunkSizeBytesFieldName
+ << kMaxChunkSizeBytes
+ << CollectionType::kNoAutoSplitFieldName << true));
+
uassertStatusOK(Grid::get(opCtx)->catalogClient()->updateConfigDocument(
opCtx,
CollectionType::ConfigNS,