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

_getLastOpTime / _getDurableOpTime do not handle missing nodes gracefully

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.3, 3.5.2
    • Component/s: Replication
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v3.4
    • Sprint:
      Repl 2016-12-12, Repl 2017-01-23

      Description

      Due to the code logic in replsettest.js, we end up with misleading messages in jstest logs:

      [js_test:remove2] 2016-11-13T18:53:53.782+0000 ReplSetTest awaitReplication: starting: optime for primary, ubuntu1604-z-3.maristisv.build.10gen.cc:20262, is { "ts" : Timestamp(1479063233, 2), "t" : NumberLong(1) }
      [js_test:remove2] 2016-11-13T18:53:53.782+0000 ReplSetTest awaitReplication: checking secondaries against latest primary optime { "ts" : Timestamp(1479063233, 2), "t" : NumberLong(1) }
      [js_test:remove2] 2016-11-13T18:53:53.783+0000 ReplSetTest awaitReplication: checking secondary #1: ubuntu1604-z-3.maristisv.build.10gen.cc:20263
      [js_test:remove2] 2016-11-13T18:53:53.783+0000 ReplSetTest awaitReplication: caught exception Error: cannot compare optimes between different protocol versions;
      [js_test:remove2] 2016-11-13T18:53:53.783+0000 rs.compareOpTimes@src/mongo/shell/utils.js:1340:1
      [js_test:remove2] 2016-11-13T18:53:53.783+0000 ReplSetTest/this.awaitReplication/<@src/mongo/shell/replsettest.js:788:25
      [js_test:remove2] 2016-11-13T18:53:53.783+0000 _convertExceptionToReturnStatus/safeFunc@src/mongo/shell/assert.js:161:20
      [js_test:remove2] 2016-11-13T18:53:53.783+0000 assert.soon@src/mongo/shell/assert.js:196:17
      [js_test:remove2] 2016-11-13T18:53:53.783+0000 assert.soonNoExcept@src/mongo/shell/assert.js:215:5
      [js_test:remove2] 2016-11-13T18:53:53.783+0000 ReplSetTest/this.awaitReplication@src/mongo/shell/replsettest.js:739:1
      [js_test:remove2] 2016-11-13T18:53:53.783+0000 @jstests/sharding/remove2.js:114:1
      

      (from https://logkeeper.mongodb.org/build/5ade67af34d8a92ee80eec581556fa52/test/5828b62abe07c47d2a04181b )
      This is due to mistakenly assuming the response to the replSetGetStatus command will always have optimes for all configured nodes in the _getLastOpTime() and _getDurableOpTime() functions.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: