diff options
author | Cheahuychou Mao <mao.cheahuychou@gmail.com> | 2022-03-22 21:11:04 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-03-22 22:38:45 +0000 |
commit | 388669a9def42795bdca598ff67c3c6c8dd7a57e (patch) | |
tree | 28ae80918fbcb3f30d94d49f958b086a29d321e9 | |
parent | 9b6d19aa8cf204a67307611a6333905359b7aa3f (diff) | |
download | mongo-388669a9def42795bdca598ff67c3c6c8dd7a57e.tar.gz |
SERVER-63877 Resharding should not migrate internal sessions for non-retryable writes to recipients
7 files changed, 8 insertions, 14 deletions
diff --git a/jstests/sharding/internal_transactions_for_non_retryable_writes_before_migration.js b/jstests/sharding/internal_transactions_for_non_retryable_writes_before_migration.js index 4e630a6d3e0..14d2704089a 100644 --- a/jstests/sharding/internal_transactions_for_non_retryable_writes_before_migration.js +++ b/jstests/sharding/internal_transactions_for_non_retryable_writes_before_migration.js @@ -2,7 +2,7 @@ * Tests that a chunk migration does not transfer the history for non-retryable internal * transactions that commit or abort on the donor before the migration to the recipient. * - * TODO (SERVER-63877): Determine if chunk migration should migrate internal sessions for + * TODO (SERVER-64331): Determine if chunk migration should migrate internal sessions for * non-retryable writes. * * @tags: [requires_fcv_53, featureFlagInternalTransactions] diff --git a/jstests/sharding/internal_transactions_for_non_retryable_writes_before_resharding.js b/jstests/sharding/internal_transactions_for_non_retryable_writes_before_resharding.js index 8e68f1fcf2c..af02a1304d8 100644 --- a/jstests/sharding/internal_transactions_for_non_retryable_writes_before_resharding.js +++ b/jstests/sharding/internal_transactions_for_non_retryable_writes_before_resharding.js @@ -2,9 +2,6 @@ * Tests that resharding does not transfer the history for non-retryable internal transactions that * commit or abort on the donor(s) before resharding to the recipient. * - * TODO (SERVER-63877): Determine if resharding should migrate internal sessions for non-retryable - * writes. - * * @tags: [requires_fcv_53, featureFlagInternalTransactions] */ (function() { diff --git a/jstests/sharding/internal_transactions_for_non_retryable_writes_during_migration.js b/jstests/sharding/internal_transactions_for_non_retryable_writes_during_migration.js index 15e72ff66d2..e4b1bf0008d 100644 --- a/jstests/sharding/internal_transactions_for_non_retryable_writes_during_migration.js +++ b/jstests/sharding/internal_transactions_for_non_retryable_writes_during_migration.js @@ -2,7 +2,7 @@ * Tests that a chunk migration does not transfer the history for non-retryable internal * transactions that commit or abort on the donor during the migration to the recipient. * - * TODO (SERVER-63877): Determine if chunk migration should migrate internal sessions for + * TODO (SERVER-64331): Determine if chunk migration should migrate internal sessions for * non-retryable writes. * * @tags: [requires_fcv_53, featureFlagInternalTransactions] diff --git a/jstests/sharding/internal_transactions_for_non_retryable_writes_during_resharding.js b/jstests/sharding/internal_transactions_for_non_retryable_writes_during_resharding.js index 5e7ee8237bd..d9560596539 100644 --- a/jstests/sharding/internal_transactions_for_non_retryable_writes_during_resharding.js +++ b/jstests/sharding/internal_transactions_for_non_retryable_writes_during_resharding.js @@ -2,9 +2,6 @@ * Tests that resharding does not transfer the history for non-retryable internal transactions that * commit or abort on the donor(s) during resharding to the recipient. * - * TODO (SERVER-63877): Determine if resharding should migrate internal sessions for non-retryable - * writes. - * * @tags: [requires_fcv_53, featureFlagInternalTransactions] */ (function() { diff --git a/src/mongo/db/s/resharding/resharding_oplog_session_application.cpp b/src/mongo/db/s/resharding/resharding_oplog_session_application.cpp index 0d1f6ac140a..44251fa39dc 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_session_application.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_session_application.cpp @@ -110,8 +110,9 @@ boost::optional<SharedSemiFuture<void>> ReshardingOplogSessionApplication::tryAp auto lsid = *op.getSessionId(); if (isInternalSessionForNonRetryableWrite(lsid)) { - // TODO (SERVER-63877): Determine if resharding should migrate internal sessions for - // non-retryable writes. + // Skip internal sessions for non-retryable writes since they only support transactions + // and those transactions are not retryable so there is no need to transfer the write + // history to resharding recipient(s). return boost::none; } if (isInternalSessionForRetryableWrite(lsid)) { diff --git a/src/mongo/db/s/resharding/resharding_oplog_session_application_test.cpp b/src/mongo/db/s/resharding/resharding_oplog_session_application_test.cpp index 7a5cb0f214e..dfaa498e4f6 100644 --- a/src/mongo/db/s/resharding/resharding_oplog_session_application_test.cpp +++ b/src/mongo/db/s/resharding/resharding_oplog_session_application_test.cpp @@ -1134,8 +1134,6 @@ TEST_F(ReshardingOplogSessionApplicationTest, IgnoreIncomingAbortedRetryableInte } TEST_F(ReshardingOplogSessionApplicationTest, IgnoreIncomingNonRetryableInternalTransaction) { - // TODO (SERVER-63877): Determine if resharding should migrate internal sessions for - // non-retryable writes. auto lsid = makeLogicalSessionIdWithTxnUUIDForTest(); TxnNumber incomingTxnNumber = 100; diff --git a/src/mongo/db/s/resharding/resharding_txn_cloner.cpp b/src/mongo/db/s/resharding/resharding_txn_cloner.cpp index a6d9836a334..0423118038a 100644 --- a/src/mongo/db/s/resharding/resharding_txn_cloner.cpp +++ b/src/mongo/db/s/resharding/resharding_txn_cloner.cpp @@ -171,8 +171,9 @@ boost::optional<SharedSemiFuture<void>> ReshardingTxnCloner::doOneRecord( auto txnNumber = donorRecord.getTxnNum(); if (isInternalSessionForNonRetryableWrite(sessionId)) { - // TODO (SERVER-63877): Determine if resharding should migrate internal sessions for - // non-retryable writes. + // Skip internal sessions for non-retryable writes since they only support transactions + // and those transactions are not retryable so there is no need to transfer the write + // history to resharding recipient(s). return boost::none; } |