Project

General

Profile

Actions

Feature #69966

open

cephfs-mirror: add an option to skip over too-frequent snapshots

Added by Alexander Patrakov about 1 year ago. Updated 9 months ago.

Status:
Fix Under Review
Priority:
Normal
Assignee:
Category:
Administration/Usability
Target version:
% Done:

0%

Source:
Community (user)
Backport:
Reviewed:
Affected Versions:
Component(FS):
cephfs-mirror
Labels (FS):
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:

Description

I was asked to split this feature request out from #69187.

The request is to add a command-line option, let's tentatively name it '--mirroring-is-too-slow', to be used when adding a directory for mirroring. The effect would be that, when the mirror daemon chooses which snapshot to mirror, the newest snapshots is always chosen, and all the intermediate the snapshots between the latest mirrored one and the latest existing one are always permanently skipped. This is to be used when snapshots are created too often and it is thus infeasible to mirror them all, e.g., because it takes three days to mirror a daily snapshot.

Example:

Pre-existing state: snapshots daily-2025-02-01, daily-2025-02-02, ... daily-2025-02-14 exist.

2025-02-14 in the evening: The directory is added to cephfs-mirror with this flag. It permanently notes that snapshots daily-2025-02-01, ..., daily-2025-02-13 will never be mirrored. It starts mirroring the daily-2025-02-14 snapshot.

2025-02-15: a new snapshot, daily-2025-02-15, is created. cephfs-mirror is still busy with daily-2025-02-14.

2025-02-16: a new snapshot, daily-2025-02-16, is created. cephfs-mirror is still busy with daily-2025-02-14.

2025-02-17: a new snapshot, daily-2025-02-17, is created. cephfs-mirror is still busy with daily-2025-02-14.

2025-02-17 in the evening: cephfs-mirror finishes mirroring daily-2025-02-14. It looks for a new snapshot to mirror. Snapshots daily-2025-02-15 and daily-2025-02-16 are permanently marked as not-for-mirroring, and the latest snapshot (daily-2025-02-17) is chosen.

2025-02-18: a new snapshot, daily-2025-02-18, is created. cephfs-mirror is still busy with daily-2025-02-17.

2025-02-19: a new snapshot, daily-2025-02-19, is created. cephfs-mirror is still busy with daily-2025-02-17.

2025-02-20: a new snapshot, daily-2025-02-20, is created. cephfs-mirror is still busy with daily-2025-02-17.

2025-02-20 in the evening: cephfs-mirror finishes mirroring daily-2025-02-17. It looks for a new snapshot to mirror. Snapshots daily-2025-02-18 and daily-2025-02-19 are permanently marked as not-for-mirroring, and the latest snapshot (daily-2025-02-20) is chosen.

And so on.

Actions #1

Updated by Venky Shankar about 1 year ago

  • Assignee set to Jos Collin
  • Target version set to v20.0.0
  • Source set to Community (user)
Actions #2

Updated by Milind Changire about 1 year ago

This feature seems to directly impact the upcoming "block-diff mirroring" algorithm by Venky.

Actions #3

Updated by Jos Collin about 1 year ago

  • Status changed from New to In Progress

Let's call this --sync-latest-snapshot-always and we need to build the snap map more differently than #69187. I don't understand how it impacts file diff.

Actions #4

Updated by Milind Changire about 1 year ago

Jos Collin wrote in #note-3:

Let's call this --sync-latest-snapshot-always and we need to build the snap map more differently than #69187. I don't understand how it impacts file diff.

AFAIK, rados listsnaps lists overlaps between adjacent snaps, I'm not sure if the API supports listing overlaps between arbitrary snapshots. Also, I'm not sure how overlaps would be handled if snapshot(s) were deleted.

Actions #5

Updated by Jos Collin about 1 year ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 61929
Actions #6

Updated by Patrick Donnelly 9 months ago

  • Target version changed from v20.0.0 to v21.0.0
Actions

Also available in: Atom PDF