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

Make jstests/sharding/mongod_returns_no_cluster_time_without_keys.js wait for primary

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Community Answered
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Sharding
    • None
    • ALL
    • Sharding 2019-06-03
    • 1

    Description

      THe test fails if the election fails when both secondaries run for election simultaneously. The test needs to be modified to wait for primary to be deterministic.

      https://logkeeper.mongodb.org/lobster/build/b5021b22da56bfba8b495eee62b9b031/test/5b6e0b0e54f2483ad2002eb3

      [js_test:mongod_returns_no_cluster_time_without_keys] 2018-08-10T22:03:03.025+0000 d21011| 2018-08-10T22:03:03.025+0000 D REPL_HB  [replexec-0] Scheduling heartbeat to WIN-7S8BKQ4MNCF:21010 at 2018-08-10T22:03:03.525Z
      [js_test:mongod_returns_no_cluster_time_without_keys] 2018-08-10T22:03:03.069+0000 d21011| 2018-08-10T22:03:03.069+0000 I REPL     [replexec-1] Starting an election, since we've seen no PRIMARY in the past 10000ms
      [js_test:mongod_returns_no_cluster_time_without_keys] 2018-08-10T22:03:03.069+0000 d21011| 2018-08-10T22:03:03.069+0000 I REPL     [replexec-1] conducting a dry run election to see if we could be elected. current term: 1
      [js_test:mongod_returns_no_cluster_time_without_keys] 2018-08-10T22:03:03.069+0000 d21010| 2018-08-10T22:03:03.069+0000 I REPL     [replexec-1] Starting an election, since we've seen no PRIMARY in the past 10000ms
      [js_test:mongod_returns_no_cluster_time_without_keys] 2018-08-10T22:03:03.069+0000 d21010| 2018-08-10T22:03:03.069+0000 I REPL     [replexec-1] conducting a dry run election to see if we could be elected. current term: 1
      [js_test:mongod_returns_no_cluster_time_without_keys] 2018-08-10T22:03:03.069+0000 d21010| 2018-08-10T22:03:03.069+0000 I REPL     [replexec-0] VoteRequester(term 1 dry run) received a yes vote from WIN-7S8BKQ4MNCF:21011; response message: { term: 1, voteGranted: true, reason: "", ok: 1.0, operationTime: Timestamp(1533938548, 3), $gleStats: { lastOpTime: Timestamp(0, 0), electionId: ObjectId('000000000000000000000000') }, $configServerState: { opTime: { ts: Timestamp(1533938580, 1), t: 2 } }, $clusterTime: { clusterTime: Timestamp(1533938580, 1), signature: { hash: BinData(0, 0000000000000000000000000000000000000000), keyId: 0 } } }
      [js_test:mongod_returns_no_cluster_time_without_keys] 2018-08-10T22:03:03.069+0000 d21010| 2018-08-10T22:03:03.069+0000 I REPL     [replexec-0] dry election run succeeded, running for election in term 2
      [js_test:mongod_returns_no_cluster_time_without_keys] 2018-08-10T22:03:03.069+0000 d21011| 2018-08-10T22:03:03.069+0000 I REPL     [replexec-0] VoteRequester(term 1 dry run) received a yes vote from WIN-7S8BKQ4MNCF:21010; response message: { term: 1, voteGranted: true, reason: "", ok: 1.0, operationTime: Timestamp(1533938548, 3), $gleStats: { lastOpTime: Timestamp(0, 0), electionId: ObjectId('000000000000000000000000') }, $configServerState: { opTime: { ts: Timestamp(1533938580, 1), t: 2 } }, $clusterTime: { clusterTime: Timestamp(1533938580, 1), signature: { hash: BinData(0, 0000000000000000000000000000000000000000), keyId: 0 } } }
      [js_test:mongod_returns_no_cluster_time_without_keys] 2018-08-10T22:03:03.069+0000 d21011| 2018-08-10T22:03:03.069+0000 I REPL     [replexec-0] dry election run succeeded, running for election in term 2
      [js_test:mongod_returns_no_cluster_time_without_keys] 2018-08-10T22:03:03.069+0000 d21011| 2018-08-10T22:03:03.069+0000 I STORAGE  [replexec-0] createCollection: local.replset.election with generated UUID: 764a3b7d-9764-4c3b-976a-81d642b1b3a2
      [js_test:mongod_returns_no_cluster_time_without_keys] 2018-08-10T22:03:03.069+0000 d21010| 2018-08-10T22:03:03.070+0000 I REPL     [replexec-1] VoteRequester(term 2) received a no vote from WIN-7S8BKQ4MNCF:21011 with reason "already voted for another candidate (WIN-7S8BKQ4MNCF:21011) this term (2)"; response message: { term: 2, voteGranted: false, reason: "already voted for another candidate (WIN-7S8BKQ4MNCF:21011) this term (2)", ok: 1.0, operationTime: Timestamp(1533938548, 3), $gleStats: { lastOpTime: Timestamp(0, 0), electionId: ObjectId('000000000000000000000000') }, $configServerState: { opTime: { ts: Timestamp(1533938580, 1), t: 2 } }, $clusterTime: { clusterTime: Timestamp(1533938580, 1), signature: { hash: BinData(0, 0000000000000000000000000000000000000000), keyId: 0 } } }
      [js_test:mongod_returns_no_cluster_time_without_keys] 2018-08-10T22:03:03.069+0000 d21010| 2018-08-10T22:03:03.070+0000 I REPL     [replexec-1] not becoming primary, we received insufficient votes
      [js_test:mongod_returns_no_cluster_time_without_keys] 2018-08-10T22:03:03.076+0000 d21011| 2018-08-10T22:03:03.077+0000 I REPL     [replexec-1] VoteRequester(term 2) received a no vote from WIN-7S8BKQ4MNCF:21010 with reason "already voted for another candidate (WIN-7S8BKQ4MNCF:21010) this term (2)"; response message: { term: 2, voteGranted: false, reason: "already voted for another candidate (WIN-7S8BKQ4MNCF:21010) this term (2)", ok: 1.0, operationTime: Timestamp(1533938548, 3), $gleStats: { lastOpTime: Timestamp(0, 0), electionId: ObjectId('000000000000000000000000') }, $configServerState: { opTime: { ts: Timestamp(1533938580, 1), t: 2 } }, $clusterTime: { clusterTime: Timestamp(1533938580, 1), signature: { hash: BinData(0, 0000000000000000000000000000000000000000), keyId: 0 } } }
      [js_test:mongod_returns_no_cluster_time_without_keys] 2018-08-10T22:03:03.076+0000 d21011| 2018-08-10T22:03:03.077+0000 I REPL     [replexec-1] not becoming primary, we received insufficient votes
      

      Attachments

        Activity

          People

            misha.tyulenev@mongodb.com Misha Tyulenev
            misha.tyulenev@mongodb.com Misha Tyulenev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: