Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-28868

Set noCursorTimeout option on oplog cursor in ReplSetTest.prototype.checkOplogs()

    • Fully Compatible
    • ALL
    • v3.4
    • Hide
      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}));
      })();
      
      Show
      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})); })();
    • TIG 2017-05-08
    • 0

      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.

            Assignee:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Reporter:
            max.hirschhorn@mongodb.com Max Hirschhorn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: