[SERVER-48679] flushRoutingTableCacheUpdates should block on critical section with kWrite, not kRead Created: 09/Jun/20 Updated: 29/Oct/23 Resolved: 01/Jul/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 3.6.18, 4.5.1, 4.0.18, 4.2.7, 4.4.0-rc8 |
| Fix Version/s: | 4.4.1, 4.7.0, 4.2.10, 4.0.22 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Esha Maharishi (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: |
v4.4, v4.2, v4.0
|
||||||||||||||||
| Sprint: | Sharding 2020-06-15, Sharding 2020-06-29 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||
| Description |
|
The donor writes the enterCriticalSectionCounter flag In 4.4 and earlier versions, if reads haven't started being blocked yet, the secondary will finish the refresh and serve reads for stale mongoses even if the migration commits. For example:
In 4.5, that happens to not be an issue since the refresh is done by calling onShardVersionMismatch which waits for the critical section as long as writes are already being blocked. Despite that, we want to change flushRoutingTableCacheUpdates in all versions to block behind the critical section with kWrite, not kRead, as it does today. |
| Comments |
| Comment by Githook User [ 19/Oct/20 ] |
|
Author: {'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}Message: (cherry picked from commit 9f4b81e5bdcf38f9b10459203a804ba406528770) |
| Comment by Githook User [ 12/Aug/20 ] |
|
Author: {'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}Message: (cherry picked from commit 9f4b81e5bdcf38f9b10459203a804ba406528770) |
| Comment by Githook User [ 12/Aug/20 ] |
|
Author: {'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}Message: (cherry picked from commit 9f4b81e5bdcf38f9b10459203a804ba406528770) |
| Comment by Githook User [ 01/Jul/20 ] |
|
Author: {'name': 'Luis Osta', 'email': 'luis.osta@mongodb.com', 'username': 'LuisOsta'}Message: |