[SERVER-69440] Improve the readability of synchronisation between clearFilteringMetadata and onShardVersionMismatch's recovery decision making Created: 05/Sep/22  Updated: 29/Oct/23  Resolved: 06/Sep/22

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 6.2.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Fixed Votes: 0
Labels: PM-2144-Cleanup
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-69444 Make the joining of concurrent critic... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding EMEA 2022-09-19
Participants:

 Description   

The condition of whether the on-disk set of MigrationCoordinator documents is consulted, with the state of the CSR from before a release of the CSR lock.

This means that it is possible that an onShardVersionMismatch, which started concurrently with chunk migration, but got to this condition just when the MigrationSourceManager failed and cleared the filtering metadata due to error, to not actually run recovery when it should.

This is currently protected by the fact that we only clear the filtering metadata under the critical section so there isn't a bug in practice, but just for the sake of better code readability we should re-take the condition after retaking the CSR lock.



 Comments   
Comment by Githook User [ 06/Sep/22 ]

Author:

{'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com', 'username': 'kaloianm'}

Message: SERVER-69440 Improve the readability of synchronisation between clearFilteringMetadata and onShardVersionMismatch's recovery decision making
Branch: master
https://github.com/mongodb/mongo/commit/a166b4268dbc4506ffddfaf2acb124bd0f5ed5b4

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