[SERVER-71328] Ensure correct filtering metadata on donor shard after multiple failures Created: 14/Nov/22 Updated: 29/Oct/23 Resolved: 06/Jan/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 5.0.13, 6.0.2, 6.1.0-rc4, 6.2.0-rc0 |
| Fix Version/s: | 6.3.0-rc0, 6.0.5, 5.0.16 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Tommaso Tocci | Assignee: | Tommaso Tocci |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | sharding-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Backport Requested: |
v6.2, v6.0, v5.0
|
||||
| Steps To Reproduce: |
Since the configOpTime known to P1 is not inclusive of the latest committed migration, there is no guarantee that any subsequent refresh of the filtering metadata would include the committed migration. |
||||
| Sprint: | Sharding EMEA 2022-12-12, Sharding EMEA 2022-12-26, Sharding EMEA 2023-01-09 | ||||
| Participants: | |||||
| Description |
|
The donor of a chunk migration calls ShardingStateRecovery::endMetadataOp() that is persisting the configOpTime inclusive of the migration commit, this is to ensure that in case of stepdown when the next primary node will read from the config server it will see the effect of the commit performed by the previous primary. The problem is that endMetadataOp() is not called after recovering a failed migration, so in case the donor experiences an error during the commit (network error) and a subsequent stepdown, there is no guarantee that the next primary node will install the correct filtering metadata inclusive of the last migration. The proposed solution is to add a VectorClock::waitForDurableConfigTime() just before writing down the commit decision in the migration coordinator document. |
| Comments |
| Comment by Githook User [ 21/Feb/23 ] |
|
Author: {'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}Message: (cherry picked from commit f782ca31ce08c7b0ec04a29eac3338884338a337) |
| Comment by Githook User [ 12/Jan/23 ] |
|
Author: {'name': 'toto', 'email': '58224719+toto-dev@users.noreply.github.com', 'username': 'toto-dev'}Message: (cherry picked from commit f782ca31ce08c7b0ec04a29eac3338884338a337) |
| Comment by Githook User [ 05/Jan/23 ] |
|
Author: {'name': 'toto', 'email': '58224719+toto-dev@users.noreply.github.com', 'username': 'toto-dev'}Message: |