[SERVER-51493] Revisit how config.transactions cloner for resharding blocks thread waiting for outstanding prepared transaction to resolve Created: 12/Oct/20  Updated: 29/Oct/23  Resolved: 02/Dec/20

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 4.9.0

Type: Task Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Max Hirschhorn
Resolution: Fixed Votes: 0
Labels: PM-234-M3, PM-234-T-config-txn-clone
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-52921 Integrate config.transactions cloner ... Closed
Related
related to SERVER-53139 Don't wait for prepared transactions ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2020-12-14
Participants:
Story Points: 1

 Description   

One option would be to schedule the callback on the Fetcher after the TransactionParticipant::onExitPrepare() future resolves. Another option would be to use a dedicated thread for the config.transactions cloner for resharding to prevent a liveness issue.



 Comments   
Comment by Githook User [ 02/Dec/20 ]

Author:

{'name': 'Max Hirschhorn', 'email': 'max.hirschhorn@mongodb.com', 'username': 'visemet'}

Message: SERVER-51493 SERVER-52922 SERVER-52938 Create ReshardingTxnCloner class.

Introduces sharded_agg_helpers::runPipelineDirectlyOnSingleShard()
function to replace the usage of the Fetcher class. ReshardingTxnCloner
yields its thread while waiting for a prepared transaction on a session
to commit or abort. ReshardingTxnCloner runs on the recipient
primary-only service's task executor rather than on the fixed executor.
The returned mongo::Future is readied when the cloning procedure has
completed successfully or failed with an error.

ReshardingTxnCloner reads the progress document from the
config.localReshardingOperations.recipient.progress_txn_cloner
collection when starting up. The reshardingTxnClonerProgressBatchSize
server parameter controls how often ReshardingTxnCloner updates its
progress document.
Branch: master
https://github.com/mongodb/mongo/commit/a3566ca80376617843c642cf0e5891b2f08681f2

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