[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: |
|
||||||||
| 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: |