[SERVER-53981] Make TenantMigrationAccessBlocker::setCommitOpTime and setAbortOpTime not try to set completion promise if it is already set Created: 22/Jan/21  Updated: 29/Oct/23  Resolved: 25/Jan/21

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

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

Issue Links:
Depends
Duplicate
is duplicated by SERVER-54088 Entering TenantMigrationAccessBlocker... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2021-02-08
Participants:
Linked BF Score: 10

 Description   

Due to risks of deadlock, TenantMigrationAccessBlocker::setCommitOpTime and setAbortOpTime both release the lock after setting _commitOpTime and _abortTime and reacquire the lock after getting committed snapshot opTime. Based on BF-19903, TenantMigrationAccessBlocker::onMajorityCommitPointUpdate by the ReplicationCoordinator thread so setCommitOpTime and setAbortOpTime could end up trying to set the completion promise after it has already been set. For more details, please see the comment in BF-19903.



 Comments   
Comment by Githook User [ 25/Jan/21 ]

Author:

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

Message: SERVER-53981 Make TenantMigrationAccessBlocker::setCommitOpTime and setAbortOpTime not try to set completion promise if it is already set
Branch: master
https://github.com/mongodb/mongo/commit/ca9f854ac4b7f9197a0574f72e450a8317696286

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