...
BugZero found this defect 2729 days ago.
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.
xgen-internal-githook commented on Thu, 20 Apr 2017 23:03:59 +0000: 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 xgen-internal-githook commented on Thu, 20 Apr 2017 20:43:56 +0000: 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
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})); })();