Give a second snapshot create in the same second its own ID (closes #270)
check / check (push) Waiting to run
check / check (push) Waiting to run
The timestamp in a snapshot ID is in whole seconds, so a `snapshot create` that started in the same second as the previous run of that snapshot name got the same ID, and inserting its row failed with `UNIQUE constraint failed: snapshots.id`. CreateSnapshotWithName now looks the ID up in the local index first and, if it is taken, waits a second and takes a new timestamp. The ID format is unchanged. Only the local index is checked. That is where the insert fails, and the process lock serializes runs, so nothing takes the ID between the lookup and the insert. Model: opus-5-5
This commit was merged in pull request #277.
This commit is contained in:
@@ -22,6 +22,14 @@ the tag exists and is exercised; what is left is merging `next` to
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-10-08: Made a second `snapshot create` of one name succeed when
|
||||
it starts in the same second as the first
|
||||
([issue #270](https://git.eeqj.de/sneak/vaultik/issues/270)). The
|
||||
timestamp in a snapshot ID is in whole seconds, so the second run got
|
||||
the first run's ID and failed with `UNIQUE constraint failed:
|
||||
snapshots.id`. When the local index already has a snapshot with the
|
||||
ID, the create now waits a second and takes a new timestamp.
|
||||
|
||||
- 2026-10-07: Made a symlink whose target cannot be read stop the backup
|
||||
([issue #269](https://git.eeqj.de/sneak/vaultik/issues/269)). It was
|
||||
left out of the snapshot with only a debug log line, even without
|
||||
|
||||
Reference in New Issue
Block a user