diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2022-02-28 20:48:31 +0100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-03-11 14:58:38 +0000 |
commit | 3de01a4acc71ab5241826fdbcb642d4ae000753f (patch) | |
tree | 9f994ab0a4affbd44c28fdf615edfc5ddc174ead /src/mongo/db/s/resharding | |
parent | 8ff255e3b85a0f4c74c2fa3842e292076926c6ff (diff) | |
download | mongo-3de01a4acc71ab5241826fdbcb642d4ae000753f.tar.gz |
SERVER-64057 Comment the shard/databaseVersion arguments for the shard role
Diffstat (limited to 'src/mongo/db/s/resharding')
-rw-r--r-- | src/mongo/db/s/resharding/resharding_destined_recipient_test.cpp | 3 | ||||
-rw-r--r-- | src/mongo/db/s/resharding/resharding_oplog_application.cpp | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/db/s/resharding/resharding_destined_recipient_test.cpp b/src/mongo/db/s/resharding/resharding_destined_recipient_test.cpp index fadc390a510..10a777709f0 100644 --- a/src/mongo/db/s/resharding/resharding_destined_recipient_test.cpp +++ b/src/mongo/db/s/resharding/resharding_destined_recipient_test.cpp @@ -476,7 +476,8 @@ TEST_F(DestinedRecipientTest, TestOpObserverSetsDestinedRecipientOnDeletesInTran auto env = setupReshardingEnv(opCtx, true); - OperationShardingState::setShardRole(opCtx, kNss, env.version, env.dbVersion); + OperationShardingState::setShardRole( + opCtx, kNss, env.version /* shardVersion */, env.dbVersion /* databaseVersion */); runInTransaction(opCtx, [&]() { deleteDoc(opCtx, kNss, BSON("_id" << 0), env); }); // Look for destined recipient in latest oplog entry. Since this write was done in a diff --git a/src/mongo/db/s/resharding/resharding_oplog_application.cpp b/src/mongo/db/s/resharding/resharding_oplog_application.cpp index 0842f9aa88c..694e7e2e993 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_application.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_application.cpp @@ -81,7 +81,10 @@ void runWithTransaction(OperationContext* opCtx, // the temporary resharding collection. We attach shard version IGNORED to the write operations // and leave it to ReshardingOplogBatchApplier::applyBatch() to retry on a StaleConfig exception // to allow the collection metadata information to be recovered. - ScopedSetShardRole scopedSetShardRole(asr.opCtx(), nss, ChunkVersion::IGNORED(), boost::none); + ScopedSetShardRole scopedSetShardRole(asr.opCtx(), + nss, + ChunkVersion::IGNORED() /* shardVersion */, + boost::none /* databaseVersion */); MongoDOperationContextSession ocs(asr.opCtx()); auto txnParticipant = TransactionParticipant::get(asr.opCtx()); |