[SERVER-49690] Retry "CappedPositionLost" when searching for old oplog entries Created: 17/Jul/20  Updated: 29/Oct/23  Resolved: 17/Jul/20

Status: Closed
Project: Core Server
Component/s: Querying, Testing Infrastructure
Affects Version/s: None
Fix Version/s: 4.2.9, 4.4.1, 4.7.0

Type: Bug Priority: Major - P3
Reporter: Charlie Swanson Assignee: Charlie Swanson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
is related to SERVER-49691 Change streams may be subject to spur... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4, v4.2
Participants:
Linked BF Score: 9

 Description   

The query plan may yield between the cursor establishment and iterating to retrieve the first result. During this yield it's possible for the oplog to "roll over" or shrink. This is rare, but if these both happen the cursor will be unable to resume after yielding and return a "CappedPositionLost" error. This can be safely retried.

We should update some tests which search for old oplog entries to retry this error.



 Comments   
Comment by Githook User [ 06/Aug/20 ]

Author:

{'name': 'Charlie Swanson', 'email': 'charlie.swanson@mongodb.com', 'username': 'cswanson310'}

Message: SERVER-49690 Retry "CappedPositionLost" to find oldest oplog entry

(cherry picked from commit b58968562034c206cd041c083d1ac3cc5e749ec1)
(cherry picked from commit a53e991dafb3860662acd3e698ac394273ce3357)
Branch: v4.2
https://github.com/mongodb/mongo/commit/708fff2bf5f6904a4109fdecbed94e2968a29b66

Comment by Githook User [ 05/Aug/20 ]

Author:

{'name': 'Charlie Swanson', 'email': 'charlie.swanson@mongodb.com', 'username': 'cswanson310'}

Message: SERVER-49690 Retry "CappedPositionLost" to find oldest oplog entry

(cherry picked from commit b58968562034c206cd041c083d1ac3cc5e749ec1)
Branch: v4.4
https://github.com/mongodb/mongo/commit/a172de28d80c85783ec4715b3e49847eeea382b9

Comment by Githook User [ 17/Jul/20 ]

Author:

{'name': 'Charlie Swanson', 'email': 'charlie.swanson@mongodb.com', 'username': 'cswanson310'}

Message: SERVER-49690 Retry "CappedPositionLost" to find oldest oplog entry
Branch: master
https://github.com/mongodb/mongo/commit/b58968562034c206cd041c083d1ac3cc5e749ec1

Generated at Thu Feb 08 05:20:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.