[SERVER-60291] Resharding Prohibited Commands Does Not Wait For The Recipient To Be Done Created: 28/Sep/21 Updated: 29/Oct/23 Resolved: 05/Oct/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 5.2.0, 5.0.4, 5.1.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Luis Osta (Inactive) | Assignee: | Luis Osta (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v5.1, v5.0
|
||||||||
| Steps To Reproduce: |
|
||||||||
| Sprint: | Sharding 2021-10-04, Sharding 2021-10-18 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 35 | ||||||||
| Story Points: | 1 | ||||||||
| Description |
|
Context The recipient's CollectionMetadata isn't updated until the coordinator sends a commands to the participants of the resharding operation to refresh. So any calls to throwIfReshardingInProgress will not necessarily reflect the state of the ReshardingRecipientService but instead reflect the state of the recipient since the last refresh. The Problem The resharding_prohibited_commands.js relies on updates to the cache.collections collection (which has caused problems in the past, see Hence when the colldMod command was executed the throwIfReshardingInProgress function received reshardingFields that have not been updated to reflect the move to done by the ReshardingRecipientService. Possible Solution We should either join the resharding operation and wait until it is done. Or take some other measure to determine whether or not the recipient is fully "done". |
| Comments |
| Comment by Githook User [ 07/Oct/21 ] |
|
Author: {'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}Message: |
| Comment by Githook User [ 06/Oct/21 ] |
|
Author: {'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}Message: |
| Comment by Githook User [ 05/Oct/21 ] |
|
Author: {'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}Message: |
| Comment by Luis Osta (Inactive) [ 01/Oct/21 ] |
|
So after talking with janna.golden, it became clear that just waiting for the resharding operation to complete won't actually maintain the same contract the test is supposed to have. This tests that the commands should be allowed right after the coordinator persists the decision even if the full operation hasn't completed yet. |