[SERVER-35239] AwaitData cursor must handle getMore from client with higher lastKnownCommittedOpTime Created: 25/May/18 Updated: 29/Oct/23 Resolved: 21/Jun/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | 3.6.5, 4.0.0-rc0 |
| Fix Version/s: | 3.6.9, 4.0.2, 4.1.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Tess Avitabile (Inactive) | Assignee: | Samyukta Lanka |
| 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.0, v3.6
|
||||||||
| Sprint: | Repl 2018-06-18, Repl 2018-07-02 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 60 | ||||||||
| Description |
|
In PlanExecutor::getNextImpl(), we will construct a CappedInsertNotifier if shouldWaitForInserts() returns true. Then, if we reach EOF, we will call waitForInserts() if shouldWaitForInserts() returns true. waitForInserts() invariants that the CappedInsertNotifier exists. This means that we can hit the invariant if shouldWaitForInserts() returns false and then later returns true. This can happen if the request specifies a lastKnownCommittedOpTime that is greater than the node's last committed op time and then the node's last committed op time moves forward so that the values are equal. That would cause this check to return false and then true. It is legal in replication for the downstream node to have a higher view of the committed op time than its sync source, so this code must be robust to that event. |
| Comments |
| Comment by Githook User [ 18/Sep/18 ] |
|
Author: {'name': 'Samy Lanka', 'email': 'samy.lanka@gmail.com', 'username': 'lankas'}Message: (cherry picked from commit 2c6e1b2fa22cbee1129409635cceedd7f99bfea1) |
| Comment by Githook User [ 13/Aug/18 ] |
|
Author: {'name': 'Samy Lanka', 'email': 'samy.lanka@gmail.com', 'username': 'lankas'}Message: Revert " This reverts commit c0c0e651b379b03201e321ae0857beb646721956. |
| Comment by Githook User [ 09/Aug/18 ] |
|
Author: {'username': 'lankas', 'name': 'Samy Lanka', 'email': 'samy.lanka@gmail.com'}Message: (cherry picked from commit 2c6e1b2fa22cbee1129409635cceedd7f99bfea1) |
| Comment by Githook User [ 04/Aug/18 ] |
|
Author: {'name': 'Samy Lanka', 'email': 'samy.lanka@gmail.com', 'username': 'lankas'}Message: (cherry picked from commit 2c6e1b2fa22cbee1129409635cceedd7f99bfea1) |
| Comment by Githook User [ 21/Jun/18 ] |
|
Author: {'username': 'lankas', 'name': 'Samy Lanka', 'email': 'samy.lanka@gmail.com'}Message: |
| Comment by Spencer Brody (Inactive) [ 29/May/18 ] |
|
I strongly suspect this is a regression added in 3.6 by |