[SERVER-48298] Force refresh on removeShard and addShard Created: 19/May/20 Updated: 29/Oct/23 Resolved: 20/May/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc7, 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Janna Golden | Assignee: | Janna Golden |
| 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: |
v4.4
|
||||||||
| Sprint: | Sharding 2020-06-01 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 13 | ||||||||
| Description |
|
Currently removeShard removes the entry in config.shards for the shard being removed and then calls ShardRegistry::reload(). It's possible that this reload actually joins an already running reload however, and so will still read in the entry just removed. We should check to see if the reload joined, and if so reload again. Also, addShard currently inserts an entry into config.shards and then calls ShardRegistry::getShard() which checks for an entry for this shard and if it does not find one, reloads. It's possible that there is an old entry for the same shard in the ShardRegistry though, so we may decide not reload and leave the ShardRegistry in a stale state until the next refresh. To be sure the ShardRegistry picks up the newest targeter and RSM, we should force a refresh after inserting the doc. |
| Comments |
| Comment by Githook User [ 20/May/20 ] |
|
Author: {'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}Message: (cherry picked from commit 820cc0f7b703ea0949c7a3c508d6708eed3d3afb) |
| Comment by Githook User [ 19/May/20 ] |
|
Author: {'name': 'jannaerin', 'email': 'golden.janna@gmail.com', 'username': 'jannaerin'}Message: |