[SERVER-83338] Update backup cursor tests not resilient to checkpoints Created: 16/Nov/23  Updated: 05/Dec/23  Resolved: 29/Nov/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0

Type: Task Priority: Major - P3
Reporter: Gregory Wlodarek Assignee: Etienne Petrel
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-83477 Add helper functions for backup curso... Closed
Related
related to SERVER-83871 Update backup cursor tests not resili... Closed
related to WT-11678 Investigate issues generated by backg... Closed
Assigned Teams:
Storage Engines
Backwards Compatibility: Fully Compatible
Sprint: 2023-11-28 - Anthill Tiger, 2023-12-12 - Heisenbug
Participants:
Story Points: 5

 Description   

A handful of tests in hot_backups do not use the retry mechanism when opening a backup cursor when a concurrent checkpoint occurs.

We should investigate which tests need to use this mechanism. Some tests may explicitly disable checkpointing by setting syncdelay to 0 to control when checkpoints take place. In those cases, we don't need the retry mechanism, and background compaction should not run for those.



 Comments   
Comment by Etienne Petrel [ 20/Nov/23 ]

Thank you, gregory.noma@mongodb.com. I have created SERVER-83477 to update backup_utils.js separately.

Comment by Etienne Petrel [ 18/Nov/23 ]

Hi gregory.noma@mongodb.com, I would like to update the backup-related tests but this requires updating backup_utils.js. However, this not part of the mongo-enterprise-modules repo, should this be done in two PRs?

Comment by Etienne Petrel [ 17/Nov/23 ]

I have pushed the following branch: SERVER-83338-backup-cursor-retry-js-tests. However I am unsure about several sections of the code:

The following should be trivial:

let backupCursor = db.aggregate([{$backupCursor: {}}]);
->
let backupCursor = openBackupCursor(rst.getPrimary());

However, how to replace the following calls?

let response = assert.commandWorked(
    db.runCommand({aggregate: 1, pipeline: [{$backupCursor: {}}], cursor: {batchSize: 2}}));
--
["$backupCursor", "$backupCursorExtend"].forEach((stage) => {
    foreignColectionStages.forEach((foreignReference) => {
        assert.throwsWithCode(() => db.aggregate([{[stage]: {}}, foreignReference]),
                              ErrorCodes.InvalidNamespace);
    });
});
--
    let backupCursor =
        primary.getDB("admin").aggregate([{$backupCursor: {incrementalBackup: false}}]);

Comment by Etienne Petrel [ 16/Nov/23 ]

Backup related tests.

Generated at Thu Feb 08 06:51:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.