[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:
Backports
Depends
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: SERVER-35239 AwaitData cursor must handle getMore from client with higher lastKnownCommittedOpTime

(cherry picked from commit 2c6e1b2fa22cbee1129409635cceedd7f99bfea1)
Branch: v3.6
https://github.com/mongodb/mongo/commit/53675ac0ff6b764c890d3fd8ee44fc7c827d3e8d

Comment by Githook User [ 13/Aug/18 ]

Author:

{'name': 'Samy Lanka', 'email': 'samy.lanka@gmail.com', 'username': 'lankas'}

Message: Revert "SERVER-35239 AwaitData cursor must handle getMore from client with higher lastKnownCommittedOpTime"

This reverts commit c0c0e651b379b03201e321ae0857beb646721956.
Branch: v3.6
https://github.com/mongodb/mongo/commit/e10f27c411b48e3036dc22295db4fdc718eadfb1

Comment by Githook User [ 09/Aug/18 ]

Author:

{'username': 'lankas', 'name': 'Samy Lanka', 'email': 'samy.lanka@gmail.com'}

Message: SERVER-35239 AwaitData cursor must handle getMore from client with higher lastKnownCommittedOpTime

(cherry picked from commit 2c6e1b2fa22cbee1129409635cceedd7f99bfea1)
Branch: v3.6
https://github.com/mongodb/mongo/commit/c0c0e651b379b03201e321ae0857beb646721956

Comment by Githook User [ 04/Aug/18 ]

Author:

{'name': 'Samy Lanka', 'email': 'samy.lanka@gmail.com', 'username': 'lankas'}

Message: SERVER-35239 AwaitData cursor must handle getMore from client with higher lastKnownCommittedOpTime

(cherry picked from commit 2c6e1b2fa22cbee1129409635cceedd7f99bfea1)
Branch: v4.0
https://github.com/mongodb/mongo/commit/97f19510c79eb405cb00b8b811804a2f9f31e295

Comment by Githook User [ 21/Jun/18 ]

Author:

{'username': 'lankas', 'name': 'Samy Lanka', 'email': 'samy.lanka@gmail.com'}

Message: SERVER-35239 AwaitData cursor must handle getMore from client with higher lastKnownCommittedOpTime
Branch: master
https://github.com/mongodb/mongo/commit/2c6e1b2fa22cbee1129409635cceedd7f99bfea1

Comment by Spencer Brody (Inactive) [ 29/May/18 ]

I strongly suspect this is a regression added in 3.6 by SERVER-29127

Generated at Thu Feb 08 04:39:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.