[SERVER-69898] Wait for the critical section catch-up phase before refreshing the DB version Created: 22/Sep/22 Updated: 29/Oct/23 Resolved: 30/Sep/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.1.1, 5.0.14, 6.0.3, 6.2.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Antonio Fuschetto | Assignee: | Antonio Fuschetto |
| 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: |
v6.1, v6.0, v5.0
|
||||
| Sprint: | Sharding EMEA 2022-10-03 | ||||
| Participants: | |||||
| Description |
|
Our framework for the critical sections allows to enter in catch-up phase (only write ops are blocked) and in a commit phase (both read and writes ops are blocked). The getCriticalSectionSignal function accepts an argument, kWrite or kRead, to get the signal when a thread is entered in the catch-up or commit phases (kWrite) or only in the commit phase (kRead). When the database version is needed to be refreshed, the current logic gets the critical section signal only when another thread is entered in the commit phase (which makes sense), BUT there is a problem. Suppose the following sequence of events:
There are two solutions for this problem:
What about secondaries? Currently, secondary nodes are notified only when the primary enters in the catch-up phase. Consequently, we can only follow the solution 2 above, which is the target of this ticket. |
| Comments |
| Comment by Githook User [ 07/Oct/22 ] |
|
Author: {'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}Message: |
| Comment by Githook User [ 07/Oct/22 ] |
|
Author: {'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}Message: |
| Comment by Githook User [ 07/Oct/22 ] |
|
Author: {'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}Message: |
| Comment by Githook User [ 30/Sep/22 ] |
|
Author: {'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}Message: |