[SERVER-59330] RSM bootstrap from config server ignores the initial shard name for validation purpose Created: 12/Aug/21 Updated: 29/Oct/23 Resolved: 20/Aug/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 4.4.6 |
| Fix Version/s: | 4.4 Required |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Andrew Shuvalov (Inactive) | Assignee: | Andrew Shuvalov (Inactive) |
| 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 | ||||||||||||
| Sprint: | Sharding 2021-08-23 | ||||||||||||
| Participants: | |||||||||||||
| Case: | (copied to CRM) | ||||||||||||
| Description |
|
We have an actual production case when the bootstrap DB got borked by obscure conditions, not excluding manual intervention. As the result the "shards" DB had a correct shard name, but the list of servers pointed to a completely different database's shard, not just non-existing servers. So the RSM started contacting a completely unrelated cluster that had an actual shard running at the configured address. In theory RSM should check that the shard name matches, but it doesn't. Our code has logic to compare incoming shard name with expected, but this check is not enabled during initial bootstrap. This is the bug to fix. How this happens? The StreamableReplicaSetMonitor constructor v4.4 creates the _sdamConfig with seed nodes but no shard name. Next, this config is used by the state machine and TopologyStateMachine::updateRSWithoutPrimary() will hit the check when currentSetName is none, and will proceed with updating the topology description. |
| Comments |
| Comment by Githook User [ 02/Sep/21 ] |
|
Author: {'name': 'Andrew Shuvalov', 'email': 'andrew.shuvalov@mongodb.com', 'username': 'shuvalov-mdb'}Message: |
| Comment by Andrew Shuvalov (Inactive) [ 20/Aug/21 ] |
|
Added |
| Comment by Githook User [ 19/Aug/21 ] |
|
Author: {'name': 'Andrew Shuvalov', 'email': 'andrew.shuvalov@mongodb.com', 'username': 'shuvalov-mdb'}Message: |