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

missing index build upon restart in standalone mode in index_build_restart_standalone.js

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Execution
    • Fully Compatible
    • ALL
    • Execution Team 2024-08-05
    • 0

      This test fails occasionally in our CI system with the symptom that the unfinished index build is not detected after restarting as a standalone.

      Local test runs with additional logging of the replica set status shows that this test fails when the last durable/committed optime has not caught up with the last applied optime: 

      [js_test:index_build_restart_standalone] [jsTest] Replica set status before shutting down: {
      [js_test:index_build_restart_standalone] [jsTest]       "set" : "index_build_restart_standalone",
      [js_test:index_build_restart_standalone] [jsTest]       "date" : ISODate("2024-07-24T02:06:37.124Z"),
      [js_test:index_build_restart_standalone] [jsTest]       "myState" : 1,
      [js_test:index_build_restart_standalone] [jsTest]       "term" : NumberLong(1),
      [js_test:index_build_restart_standalone] [jsTest]       "syncSourceHost" : "",
      [js_test:index_build_restart_standalone] [jsTest]       "syncSourceId" : -1,
      [js_test:index_build_restart_standalone] [jsTest]       "heartbeatIntervalMillis" : NumberLong(2000),
      [js_test:index_build_restart_standalone] [jsTest]       "majorityVoteCount" : 1,
      [js_test:index_build_restart_standalone] [jsTest]       "writeMajorityCount" : 1,
      [js_test:index_build_restart_standalone] [jsTest]       "votingMembersCount" : 1,
      [js_test:index_build_restart_standalone] [jsTest]       "writableVotingMembersCount" : 1,
      [js_test:index_build_restart_standalone] [jsTest]       "optimes" : {
      [js_test:index_build_restart_standalone] [jsTest]               "lastCommittedOpTime" : {
      [js_test:index_build_restart_standalone] [jsTest]                       "ts" : Timestamp(1721786795, 5),
      [js_test:index_build_restart_standalone] [jsTest]                       "t" : NumberLong(1)
      [js_test:index_build_restart_standalone] [jsTest]               },
      [js_test:index_build_restart_standalone] [jsTest]               "lastCommittedWallTime" : ISODate("2024-07-24T02:06:35.689Z"),
      [js_test:index_build_restart_standalone] [jsTest]               "readConcernMajorityOpTime" : {
      [js_test:index_build_restart_standalone] [jsTest]                       "ts" : Timestamp(1721786795, 5),
      [js_test:index_build_restart_standalone] [jsTest]                       "t" : NumberLong(1)
      [js_test:index_build_restart_standalone] [jsTest]               },
      [js_test:index_build_restart_standalone] [jsTest]               "appliedOpTime" : {
      [js_test:index_build_restart_standalone] [jsTest]                       "ts" : Timestamp(1721786797, 2),
      [js_test:index_build_restart_standalone] [jsTest]                       "t" : NumberLong(1)
      [js_test:index_build_restart_standalone] [jsTest]               },
      [js_test:index_build_restart_standalone] [jsTest]               "durableOpTime" : {
      [js_test:index_build_restart_standalone] [jsTest]                       "ts" : Timestamp(1721786795, 5),
      [js_test:index_build_restart_standalone] [jsTest]                       "t" : NumberLong(1)
      [js_test:index_build_restart_standalone] [jsTest]               },
      

      One potential solution to "lock" in the index builds into the checkpoint would be to use the LAST_DURABLE option to the ReplSetTest.awaitReplication() call in the test. We have used this option previously in SERVER-34108 (rebuild_multiple_indexes_at_startup.js) and SERVER-36623 (do_not_rebuild_indexes_before_repair.js).

            Assignee:
            louis.williams@mongodb.com Louis Williams
            Reporter:
            benety.goh@mongodb.com Benety Goh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: