Fix timeout in read_replica_startup_before_primary.js

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Storage Engines - Server Integration
    • Fully Compatible
    • ALL
    • SESIBunny - 2026-04-07
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      There exists a race condition in read_replica_startup_before_primary.js between uploading the writes from the primary to the log server here and shutting down the primary here. If the primary is shutdown before the writes propagate to the log server, the subsequent assert.soon() times out.

      Add a check that the "testcoll" collection and documents have been successfully uploaded to the log server before shutting down the primary.

      Logs

      [js_test:read_replica_startup_before_primary] @src/mongo/db/modules/atlas/jstests/disagg_storage/read_replica_startup_before_primary.js:118:8 
      [js_test:read_replica_startup_before_primary] Error: assert.soon failed (timeout 600000ms), msg : Collection does not exist on read replica. Look for collection NS testdb.testcoll or storage engine ident collection-97d58f8c-7721-4bc0-acd9-e5e97e6c40b9 in read replica logs. The hang analyzer is automatically called in assert.soon functions. If you are *expecting* assert.soon to possibly fail, call assert.soon with {runHangAnalyzer: false} as the fifth argument (you can fill unused arguments with `undefined`). 

      Discovered as part of fixing the NotPrimaryOrSecondary error sometimes produced here.

       

            Assignee:
            Daniel Khuu
            Reporter:
            Cedric Sirianni
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: