[SERVER-66296] ReshardingOplogBatchApplier and ReshardingTxnCloner should wait for conflicting transaction to complete upon hitting RetryableTransactionInProgress Created: 06/May/22  Updated: 29/Oct/23  Resolved: 10/May/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.0.0-rc5, 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Cheahuychou Mao Assignee: Cheahuychou Mao
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v6.0
Sprint: Sharding NYC 2022-05-16
Participants:
Linked BF Score: 55

 Description   

RetryableTransactionInProgress is an error that is thrown by TransactionParticipant::beginOrContinue() when we try to begin/continue a retryable write or begin an internal transaction for that retryable write while there is an in-progress internal transaction for it. The ReshardingOplogBatchApplier and ReshardingTxnCloner can hit this error if it happens to be writing noop oplog entries for a retryable write that has been executed in an internal transaction with the recipient shard as one of the participant shards while there is a retry in progress. Therefore, upon receiving a RetryableTransactionInProgress error, withSessionCheckedOut should return the completion future for the in-progress internal transaction so that the ReshardingOplogBatchApplier and ReshardingTxnCloner wait for the transaction to complete and retry just like they do for prepared transactions here and here. This is what the ServiceEntryPoint does.



 Comments   
Comment by Githook User [ 10/May/22 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}

Message: SERVER-66296 ReshardingOplogBatchApplier and ReshardingTxnCloner should wait for conflicting transaction to complete upon hitting RetryableTransactionInProgress

(cherry picked from commit a7f575b9c7a340d1822ebdf8f53fa116066723db)
Branch: v6.0
https://github.com/mongodb/mongo/commit/a615e9b7bc9fb4728107d5ae83fd1ec47969769c

Comment by Githook User [ 10/May/22 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'mao.cheahuychou@gmail.com', 'username': 'cheahuychou'}

Message: SERVER-66296 ReshardingOplogBatchApplier and ReshardingTxnCloner should wait for conflicting transaction to complete upon hitting RetryableTransactionInProgress
Branch: master
https://github.com/mongodb/mongo/commit/a7f575b9c7a340d1822ebdf8f53fa116066723db

Generated at Thu Feb 08 06:05:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.