[SERVER-28868] Set noCursorTimeout option on oplog cursor in ReplSetTest.prototype.checkOplogs() Created: 19/Apr/17  Updated: 30/Oct/23  Resolved: 20/Apr/17

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: 3.4.0-rc0
Fix Version/s: 3.4.5, 3.5.7

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Max Hirschhorn
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-25376 Add a hook to check that oplogs in a ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.4
Steps To Reproduce:

python buildscripts/resmoke.py --executor=jstestfuzz_replication repro_server28868.js

repro_server28868.js

(function() {
    // Set the cursor timeout to a small value and have the cursor monitor check for expired cursors
    // more frequently.
    assert.commandWorked(db.adminCommand({setParameter: 1, cursorTimeoutMillis: 10}));
    assert.commandWorked(db.adminCommand({setParameter: 1, clientCursorMonitorFrequencySecs: 1}));
 
    // Insert some data to produce oplog entries.
    const bulk = db.mycoll.initializeUnorderedBulkOp();
    for (let i = 0; i < 10000; ++i) {
        bulk.insert({key: "x".repeat(5 * 1024)});
    };
    assert.writeOK(bulk.execute({w: 2}));
})();

Sprint: TIG 2017-05-08
Participants:
Linked BF Score: 0

 Description   

It is possible that a test sets the "cursorTimeoutMillis" server parameter to a small value and never resets it to the default value of 10 minutes. Running the run_check_repl_oplog.js check after one of these tests can cause the cursor on the oplog to time out. We should set the noCursorTimeout option on the oplog cursor to prevent it from timing out.



 Comments   
Comment by Githook User [ 20/Apr/17 ]

Author:

{u'username': u'visemet', u'name': u'Max Hirschhorn', u'email': u'max.hirschhorn@mongodb.com'}

Message: SERVER-28868 Set noCursorTimeout option on cursor in checkOplogs().

(cherry picked from commit ba040d4d48acda02caa4c6fe05da94f2ec5ef238)
Branch: v3.4
https://github.com/mongodb/mongo/commit/11c69e72cee75ca7450785943866659c49656548

Comment by Githook User [ 20/Apr/17 ]

Author:

{u'username': u'visemet', u'name': u'Max Hirschhorn', u'email': u'max.hirschhorn@mongodb.com'}

Message: SERVER-28868 Set noCursorTimeout option on cursor in checkOplogs().
Branch: master
https://github.com/mongodb/mongo/commit/ba040d4d48acda02caa4c6fe05da94f2ec5ef238

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