[SERVER-47024] Ensure there is a "lastDocID" in sharded_backup_restore.js Created: 20/Mar/20  Updated: 29/Oct/23  Resolved: 23/Mar/20

Status: Closed
Project: Core Server
Component/s: Replication, Sharding, Storage
Affects Version/s: None
Fix Version/s: 4.4.0-rc9, 4.7.0

Type: Bug Priority: Major - P3
Reporter: Judah Schvimer Assignee: Judah Schvimer
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4
Sprint: Repl 2020-03-23, Repl 2020-04-06
Participants:
Linked BF Score: 22

 Description   

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.


 Comments   
Comment by Githook User [ 10/Jun/20 ]

Author:

{'name': 'Judah Schvimer', 'email': 'judah@mongodb.com', 'username': 'judahschvimer'}

Message: SERVER-47024 Ensure there is a lastDocID in sharded_backup_restore.js

(cherry picked from commit d1a7a74a6f99a65a075f656c21db939a6c437d19)
Branch: v4.4
https://github.com/10gen/mongo-enterprise-modules/commit/1e7f8ab318667649c15fd7fd90e678b0b6ee1a1e

Generated at Thu Feb 08 05:13:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.