diff options
author | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2021-05-06 23:19:58 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-05-07 00:01:40 +0000 |
commit | 9c4a555660fd6d7c8ec36b1c8a1a6eb60fe9149a (patch) | |
tree | 152cc08a2c536e1a1260fe10fd361280f8cb091e /src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp | |
parent | 35997dbc6b0419c71f054894fe846f03d490eddd (diff) | |
download | mongo-9c4a555660fd6d7c8ec36b1c8a1a6eb60fe9149a.tar.gz |
SERVER-56338 Make resharding CRUD and session application concurrent.
Diffstat (limited to 'src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp')
-rw-r--r-- | src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp b/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp index 1b48da004fe..417139aada9 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp @@ -343,12 +343,11 @@ TEST_F(ReshardingOplogBatchApplierTest, WaitsOnPreparedTxnAndAutomaticallyRetrie TxnNumber incomingTxnNumber = existingTxnNumber + 1; auto oplogEntry = makeFinishTxnOp(lsid, incomingTxnNumber); - oplogEntry.setIsForReshardingSessionApplication(true); auto executor = makeTaskExecutorForApplier(); auto factory = makeCancelableOpCtxForApplier(CancellationToken::uncancelable()); - auto future = - applier()->applyBatch({&oplogEntry}, executor, CancellationToken::uncancelable(), factory); + auto future = applier()->applyBatch<true>( + {&oplogEntry}, executor, CancellationToken::uncancelable(), factory); ASSERT_FALSE(future.isReady()); // Wait a little bit to increase the likelihood that the applier has blocked on the prepared @@ -395,12 +394,12 @@ TEST_F(ReshardingOplogBatchApplierTest, CancelableWhileWaitingOnPreparedTxn) { TxnNumber incomingTxnNumber = existingTxnNumber + 1; auto oplogEntry = makeFinishTxnOp(lsid, incomingTxnNumber); - oplogEntry.setIsForReshardingSessionApplication(true); CancellationSource cancelSource; auto executor = makeTaskExecutorForApplier(); auto factory = makeCancelableOpCtxForApplier(CancellationToken::uncancelable()); - auto future = applier()->applyBatch({&oplogEntry}, executor, cancelSource.token(), factory); + auto future = + applier()->applyBatch<true>({&oplogEntry}, executor, cancelSource.token(), factory); ASSERT_FALSE(future.isReady()); // Wait a little bit to increase the likelihood that the applier has blocked on the prepared |