prune never deletes a leftover .partial upload, and remote info does not show it #466

Open
opened 2026-11-19 08:03:26 +01:00 by clawbot · 1 comment
Collaborator

Found by the acceptance test (#418), testing rclone destinations on next at d747dde.

Steps to reproduce

  • Use an rclone destination whose remote has a server-side move (local and WebDAV both do).
  • Kill vaultik snapshot create with kill -9 while a blob uploads, then run it again to completion.
  • Run vaultik prune --force, then vaultik remote info.

What happened

The killed upload leaves blobs/xx/yy/HASH-RANDOM.partial on the destination; on the local remote it was 21 MB of a 35 MB blob. The next backup ignores it and completes correctly. prune never deletes it, however old: only remote nuke calls DeletePartialUploads (internal/vaultik/prune.go). remote info reports no orphaned data, because its listing skips .partial names. So each killed upload can leave up to blob_size_limit (default 10 GB) that the user is never shown. The README says such a file "is ignored and can be deleted", but on an rclone remote that takes the rclone tool and the hashed path. A file:// destination behaves the same, by code trace.

What should happen

prune deletes a .partial object once it is older than prune_grace_period, as it does an unreferenced blob. remote info counts such objects.

Not blocking: nothing breaks, but storage leaks unseen. Worth fixing before 1.0.

Model: opus-5-5

Found by the acceptance test (https://git.eeqj.de/sneak/vaultik/issues/418), testing rclone destinations on `next` at `d747dde`. **Steps to reproduce** - Use an rclone destination whose remote has a server-side move (local and WebDAV both do). - Kill `vaultik snapshot create` with `kill -9` while a blob uploads, then run it again to completion. - Run `vaultik prune --force`, then `vaultik remote info`. **What happened** The killed upload leaves `blobs/xx/yy/HASH-RANDOM.partial` on the destination; on the local remote it was 21 MB of a 35 MB blob. The next backup ignores it and completes correctly. `prune` never deletes it, however old: only `remote nuke` calls `DeletePartialUploads` (`internal/vaultik/prune.go`). `remote info` reports no orphaned data, because its listing skips `.partial` names. So each killed upload can leave up to `blob_size_limit` (default 10 GB) that the user is never shown. The README says such a file "is ignored and can be deleted", but on an rclone remote that takes the `rclone` tool and the hashed path. A `file://` destination behaves the same, by code trace. **What should happen** `prune` deletes a `.partial` object once it is older than `prune_grace_period`, as it does an unreferenced blob. `remote info` counts such objects. Not blocking: nothing breaks, but storage leaks unseen. Worth fixing before 1.0. Model: opus-5-5
clawbot self-assigned this 2026-11-19 08:03:26 +01:00
Author
Collaborator

PR: #474 (branch issue-466-prune-partial-uploads).

prune deletes .partial objects under metadata/ and blobs/ once older than prune_grace_period; remote info counts them on their own line and in --json. The storage interface's DeletePartialUploads became ListPartialUploads, so remote nuke now also names any .partial object it could not delete.

Model: opus-5-5

PR: https://git.eeqj.de/sneak/vaultik/pulls/474 (branch `issue-466-prune-partial-uploads`). `prune` deletes `.partial` objects under `metadata/` and `blobs/` once older than `prune_grace_period`; `remote info` counts them on their own line and in `--json`. The storage interface's `DeletePartialUploads` became `ListPartialUploads`, so `remote nuke` now also names any `.partial` object it could not delete. 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#466