[SERVER-47366] Check the electionId before updating config.shards Created: 06/Apr/20 Updated: 06/Dec/22 Resolved: 23/Apr/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Janna Golden | Assignee: | [DO NOT USE] Backlog - Sharding Team |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Assigned Teams: |
Sharding
|
||||
| Operating System: | ALL | ||||
| Backport Requested: |
v4.4
|
||||
| Sprint: | Sharding 2020-04-20, Sharding 2020-05-04 | ||||
| Participants: | |||||
| Description |
|
Before updating config.shards, check to make sure the electionId is not stale. It is possible that the RSM receives two responses with different views of the replica set in the "correct" order (the older reponse before newer), but that the config server receives the writes in the opposite order, thus overwriting the correct entry in config.shards. |
| Comments |
| Comment by Esha Maharishi (Inactive) [ 23/Apr/20 ] |
|
Closing as Won't Fix because it has always been possible for config.shards to be updated with stale info. This fix would prevent config.shards from getting updated with such stale info that it writes a connection string with none of the current replica set members, making the shard essentially unreachable from a node doing its first ever ShardRegistry reload (e.g., a node that's restarted) until config.shards is updated with newer info. However, we have not heard any customer reports about this being a problem in practice. We can always re-open if we do hear a report. |
| Comment by Lamont Nelson [ 15/Apr/20 ] |
|
This part of the shard registry protocol is broken as the persisted data can come from a node who talks to an old primary and overwrite newer information. Changing the status to open since there are no active BF tickets for this particular issue even though such a schedule is possible. |