[SERVER-21484] Race writing minvalid doc when becoming too stale and applying a batch Created: 16/Nov/15 Updated: 06/Dec/22 Resolved: 11/Jun/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 2.0.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Scott Hernandez (Inactive) | Assignee: | Backlog - Replication Team |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Replication
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
These two threads (bgsync+oplogreader/synctail) can both write to the minvalid document. We should have the helper error if the previous state isn't correct when writing the minvalid document when applying the batch. Then it should take the max of the minvalid.end and min of minvalid.start as the correct minvalid boundaries. In addition we should change oplogreader.connect to return a status so that bgsync can decide how to enter the too-stale state. |