Periodic snapshot time synchronization and alignment

Description

We have a system where we have many datasets with periodic snapshots and replication tasks. We found that with too frequent autosnap periods, the time between snapshots is sometimes greater than the snapshot period. It seems as the system is loaded somehow to prevent some scripts to finish in time, and such for a 5 minutes periodic snapshot task we end up in snapshots like

@auto-20171009.1450-1d
@auto-20171009.1455-1d
@auto-20171009.1501-1d
@auto-20171009.1506-1d
@auto-20171009.1511-1d
@auto-20171009.1517-1d

It is acceptable, but it would be much nicer that a 5 minutes snapshot task would produce snapshots in 5 minute intervals exactly. Moreover, that would be much nicer that all snapshots' timestamp would align to their snapshot interval. With an autosnap rewrite, and with some change to current implementation, we could make all snapshots align to their period, and thus we would not need to query already existing ones, which may take the time to cause my problem.

So, the autosnap script might at the very first just create snapshots according to their periodic settings:

create 5 minutes snapshots in every 0,5,10,15... minutes in the hour.
create 10 minutes snapshots in every 0,10,20,... minutes in the hour.
and so on.

And after they've been created, just query the existing ones to begin expiring them.

Thoughts?

Competition Assessment

None

is duplicated by

SmartDraw Connector

Katalon Manual Tests (BETA)

Activity

Show:

Dru Lavigne August 8, 2019 at 8:10 PM

this should be resolved by the replication rewrite in 11.3.

Sean Eric Fagan May 1, 2018 at 6:26 PM

I thought someone else took over replication and snapshots!

Sean Eric Fagan October 9, 2017 at 7:35 PM

The way to do that would be to check the name of the snapshot if the property didn't exist. So it's not a problem

(Another thing to do is to introduce new snapshot name schemes for replication; Corral did this. But it's a major change and doing it introduces problems due to behavioural changes, so it should be considered carefully.)

Eric Loewenthal October 9, 2017 at 7:33 PM

If expiration becomes a ZFS property, it seems like there should be some option to either convert old snapshots to use the new format or also operate on them, besides the newer format. Having a bunch of orphaned snapshots that don't get automatically pruned on schedule is going to confuse a lot of people.

Sean Eric Fagan October 9, 2017 at 5:36 PM

That doesn't seem to unreasonable – I'm reading this as "split out snapshot creation, snapshot expiration, and replication tasks".

I do wonder, though, if perhaps we ought to bite the same bullet corral bit, and put the expiration date into a property on the snapshot, rather than embedding it in the name.

Thoughts and comments welcome here.

Duplicate
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Fix versions

Priority

More fields

Katalon Platform

Created October 9, 2017 at 1:05 PM
Updated July 1, 2022 at 4:27 PM
Resolved August 8, 2019 at 8:10 PM