[SERVER-45648] Make _configsvrCreateDatabase send _flushDatabaseCacheUpdates to primary shard even if database already existed in config.databases Created: 17/Jan/20 Updated: 29/Oct/23 Resolved: 12/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.4.0-rc0, 4.7.0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Esha Maharishi (Inactive) | Assignee: | Blake Oler |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | sharding-4.4-stabilization, sharding-csrs-stepdown-also, sharding-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Backport Requested: |
v4.4
|
||||||||
| Sprint: | Sharding 2020-03-23 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 28 | ||||||||
| Description |
|
Currently, if a config stepdown occurs after the database has been written to the sharding catalog but before the config sends _flushDatabaseCacheUpdates to the primary shard, a _configsvrCreateDatabase retry will see that the database already exists in the sharding catalog, and so returns early without running _flushDatabaseCacheUpdates. As a result, a database can be created even though the primary shard's filtering metadata for the database is "unknown." This is not incorrect, but is not optimal as described here Making _configsvrCreateDatabase send _flushDatabaseCacheUpdates even if the database already exists is not a perfect solution, since if the router does not retry (e.g., because the router crashed) or exhausts its retries (e.g., due to repeated network errors), this issue can still occur. However, this solution will at least prevent the BF from happening on Evergreen. A correct solution would require a larger design change to how the sharding catalog is kept in sync between the config server and shards. |
| Comments |
| Comment by Githook User [ 13/Mar/20 ] |
|
Author: {'name': 'Blake Oler', 'username': 'BlakeIsBlake', 'email': 'blake.oler@mongodb.com'}Message: (cherry picked from commit db3a17bbfe2e265722ed88df961e79f3e1a68067) |
| Comment by Githook User [ 12/Mar/20 ] |
|
Author: {'name': 'Blake Oler', 'username': 'BlakeIsBlake', 'email': 'blake.oler@mongodb.com'}Message: |