[SERVER-54300] Tenant migration donor instance state documents should be protected by a mutex Created: 04/Feb/21  Updated: 29/Oct/23  Resolved: 15/Mar/21

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

Type: Task Priority: Major - P3
Reporter: Jack Mulrow Assignee: Jason Zhang
Resolution: Fixed Votes: 0
Labels: bkp, pm-1791_other_required
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Sharding 2021-02-22, Sharding 2021-03-08, Sharding 2021-03-22
Participants:

 Description   

Each instance of the TenantMigrationDonorService maintains an in-memory copy of its underlying state document. This is written to by the main logic that drives a migration and may be concurrently read from other threads, e.g. for currentOp reporting. To avoid data races, the state document should be protected by a mutex.



 Comments   
Comment by Githook User [ 12/Mar/21 ]

Author:

{'name': 'Jason Zhang', 'email': 'jason.zhang@mongodb.com', 'username': 'jz1242'}

Message: SERVER-54300 Tenant migration donor instance state documents should be protected by a mutex
Branch: master
https://github.com/mongodb/mongo/commit/c9e91f213a7f28bf466ca7103fe9552f4b993e79

Comment by Xuerui Fa [ 04/Feb/21 ]

Because of the bug described in SERVER-53996, we should make sure we release the instance mutex when doing any storage transactions like writing the state document to disk, otherwise we may run into a deadlock situation with concurrent stepDowns.

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