[SERVER-37042] Handle exceptions from cursor.next in ReplSetTest Created: 07/Sep/18  Updated: 29/Oct/23  Resolved: 19/Sep/18

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 4.0.3, 4.1.4

Type: Bug Priority: Major - P3
Reporter: David Bradford (Inactive) Assignee: David Bradford (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Problem/Incident
causes SERVER-47071 CheckReplOplogs can fail to detect a ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.0
Participants:
Linked BF Score: 13

 Description   

The `checkOplogs` function in ReplSetTest assumes that if a cursors `hasNext()` function does not throw an error that that cursors `next()` function will also not throw an error. This is not true, however. There are some cases where `hasNext()` could return true and `next()` throws an error. The `checkOplogs` function should handle those cases.



 Comments   
Comment by Githook User [ 19/Sep/18 ]

Author:

{'name': 'David Bradford', 'email': 'david.bradford@mongodb.com', 'username': 'dbradf'}

Message: SERVER-37042 SERVER-36897: Handle errors from cursor.next in checkOplogs

(cherry picked from commit 86d7a754bd72f055445968f4de92c60ae7b8ae70)
Branch: v4.0
https://github.com/mongodb/mongo/commit/e248c85a590b7e8eaf7c6150ddbe240cd595e6f2

Comment by Githook User [ 19/Sep/18 ]

Author:

{'name': 'David Bradford', 'email': 'david.bradford@mongodb.com', 'username': 'dbradf'}

Message: SERVER-37042 SERVER-36897: Handle errors from cursor.next in checkOplogs
Branch: master
https://github.com/mongodb/mongo/commit/86d7a754bd72f055445968f4de92c60ae7b8ae70

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