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

Ensure there is a "lastDocID" in sharded_backup_restore.js

    • Fully Compatible
    • ALL
    • v4.4
    • Repl 2020-03-23, Repl 2020-04-06
    • 22

      lastDocID is chosen by looking for a docId field in the last oplog entry restored on every shard and config server. All of the oplog entries on the shards at this point in the test have a docId field. For this to exist, there must be at least one oplog entry to restore on one shard. If not enough writes happen in general, or specifically on the CSRS (which is not currently guaranteed), then there may not be a lastDocID to retrieve. To ensure there is a lastDocID and clarify the test we should do 3 things:

      1. Fix the test to say "Backing up CSRS" instead of Backing up shard4"
      2. Get the lastDocID right after getting the restoreOplogEntries so that the test fails much earlier when it needs to.
      3. Repeatedly choose a PIT restore time and get the restoreOplogEntries until there is a lastDocID. This should be guaranteed to eventually happen since the noop writer is on.

            Assignee:
            judah.schvimer@mongodb.com Judah Schvimer
            Reporter:
            judah.schvimer@mongodb.com Judah Schvimer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: