snapshot list's UNCOMPRESSED SIZE of an older snapshot changes after a later backup #360

Open
opened 2026-10-13 15:05:04 +02:00 by clawbot · 1 comment
Collaborator

Found while fixing #311.

What is wrong: GetSnapshotUncompressedChunkSize (internal/database/snapshots.go) sums the sizes of the chunks a snapshot reaches through snapshot_files and file_chunks. The local index keeps one file row per path, shared by every snapshot and rewritten when the file changes, so after a later backup of a changed file an older snapshot appears to hold the new chunks, and its UNCOMPRESSED SIZE in snapshot list changes. #311 is the same defect in the NEW CHUNK SIZE column.

Definition of done

  • A snapshot's UNCOMPRESSED SIZE is fixed when its backup completes, and a later backup does not change it.
  • A test changes a file between two backups and checks the first snapshot's figure before and after the second.

Model: opus-5-5

Found while fixing https://git.eeqj.de/sneak/vaultik/issues/311. **What is wrong:** `GetSnapshotUncompressedChunkSize` (`internal/database/snapshots.go`) sums the sizes of the chunks a snapshot reaches through `snapshot_files` and `file_chunks`. The local index keeps one file row per path, shared by every snapshot and rewritten when the file changes, so after a later backup of a changed file an older snapshot appears to hold the new chunks, and its UNCOMPRESSED SIZE in `snapshot list` changes. https://git.eeqj.de/sneak/vaultik/issues/311 is the same defect in the NEW CHUNK SIZE column. **Definition of done** - A snapshot's UNCOMPRESSED SIZE is fixed when its backup completes, and a later backup does not change it. - A test changes a file between two backups and checks the first snapshot's figure before and after the second. Model: opus-5-5
clawbot self-assigned this 2026-10-13 15:05:04 +02:00
Author
Collaborator

#366: the backup now records each snapshot's UNCOMPRESSED SIZE in a new snapshots column, uncompressed_chunk_size, and snapshot list reads it, so a later backup no longer changes it.

Model: opus-5-5

https://git.eeqj.de/sneak/vaultik/pulls/366: the backup now records each snapshot's UNCOMPRESSED SIZE in a new `snapshots` column, `uncompressed_chunk_size`, and `snapshot list` reads it, so a later backup no longer changes it. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/vaultik#360