Administration › Spaces: "Remove partial copy" for a half copy left by an interrupted rename (mockup first) #1026

Closed
opened 2026-10-27 10:47:56 +00:00 by Cordy · 2 comments
Owner

Follow-up to #969 (decided by Nikola, 2026-10-27). From v0.6.361 an interrupted space rename on S3 that leaves a partial copy of the space's files is recorded (halfCopies) and shown on the space's admin row, with the advice to remove it on the storage.

Wanted: a Remove partial copy action on that row.

  • A whole-page mockup first.
  • Then a typed confirm and an audit entry.
  • It must remove only keys the copy wrote, never other files under that folder name (the target folder can hold files that are not the space's).
  • It respects legal holds.
Follow-up to #969 (decided by Nikola, 2026-10-27). From v0.6.361 an interrupted space rename on S3 that leaves a partial copy of the space's files is recorded (`halfCopies`) and shown on the space's admin row, with the advice to remove it on the storage. **Wanted:** a **Remove partial copy** action on that row. - A whole-page mockup first. - Then a typed confirm and an audit entry. - It must remove only keys the copy wrote, never other files under that folder name (the target folder can hold files that are not the space's). - It respects legal holds.
Author
Owner

Mockup approved (Nikola, 2026-10-28)

design-direction-decision-needed/1026-remove-partial-copy-mockup.html. Today nothing records which keys an interrupted copy wrote (copiedKeys lives only in memory), so:

  • Copy record first: per move (space id, source and target folder, start, instance, stopped-at-copies-left flag) beside the registry on the data volume, one line per key written (key, size, ETag) via storage.Progress; it follows the folder when it becomes a half copy; cleared by SetBackendDir and by a finished removal (DropHalfCopy).
  • Old half copies (v0.6.361 to v0.6.367): only by exact content match (path, size, ETag) on stores where CopyObject keeps the ETag; otherwise keep the manual advice.
  • Removal is permanent and only of keys proven to be the copy's; a space file that changed since: remove the copy; a file no longer in the space: keep the copy.
  • Holds: a hold on the folder or a parent turns the action off; holds inside keep those items.
  • Typed confirm: the folder name, checked on the server (409 confirm-mismatch). Session admins only, S3 only, one run per space under the convergence lock, progress like Finish rename. Audit space-half-copy-removed / space-half-copy-remove-refused. Storage unreachable keeps the line with an "unknown" state.
## Mockup approved (Nikola, 2026-10-28) `design-direction-decision-needed/1026-remove-partial-copy-mockup.html`. Today nothing records which keys an interrupted copy wrote (`copiedKeys` lives only in memory), so: - **Copy record first:** per move (space id, source and target folder, start, instance, stopped-at-copies-left flag) beside the registry on the data volume, one line per key written (key, size, ETag) via `storage.Progress`; it follows the folder when it becomes a half copy; cleared by `SetBackendDir` and by a finished removal (`DropHalfCopy`). - **Old half copies (v0.6.361 to v0.6.367):** only by exact content match (path, size, ETag) on stores where CopyObject keeps the ETag; otherwise keep the manual advice. - Removal is permanent and only of keys proven to be the copy's; a space file that changed since: remove the copy; a file no longer in the space: keep the copy. - Holds: a hold on the folder or a parent turns the action off; holds inside keep those items. - Typed confirm: the folder name, checked on the server (409 `confirm-mismatch`). Session admins only, S3 only, one run per space under the convergence lock, progress like Finish rename. Audit `space-half-copy-removed` / `space-half-copy-remove-refused`. Storage unreachable keeps the line with an "unknown" state.
Author
Owner

Shipped in v0.6.368 (PR #1038), both dogfoods bumped.

  • Administration › Spaces: "Remove partial copy…" on a half-copy row (S3, session admins, typed folder name, permanent). Only keys proven to be the copy's go: from the new per-move copy record, or for v0.6.361-v0.6.367 half copies by exact path/size/ETag match where copies keep the ETag. Foreign, changed, held and no-longer-in-the-space items stay and are listed.
  • Batches of 1000 re-check a fresh hold snapshot, the registry and each batch's keys; run lease + move heartbeat across instances; convergence/Finish rename wait while a removal runs (half-copy-removing); stops after 2 min without progress; preview may answer 202.
  • S3 folder moves never delete their source when a copied key is gone or changed at the destination.
  • Audit space-half-copy-removed / space-half-copy-remove-refused; docs spaces-rename.md#half-copies.

Multi-instance leftovers posted to #742. Live check: next time a dogfood leaves a half copy (or a deliberate S3 rename interrupt), run the action and check the kept list; added to #1005.

Shipped in v0.6.368 (PR #1038), both dogfoods bumped. - Administration › Spaces: "Remove partial copy…" on a half-copy row (S3, session admins, typed folder name, permanent). Only keys proven to be the copy's go: from the new per-move copy record, or for v0.6.361-v0.6.367 half copies by exact path/size/ETag match where copies keep the ETag. Foreign, changed, held and no-longer-in-the-space items stay and are listed. - Batches of 1000 re-check a fresh hold snapshot, the registry and each batch's keys; run lease + move heartbeat across instances; convergence/Finish rename wait while a removal runs (`half-copy-removing`); stops after 2 min without progress; preview may answer 202. - S3 folder moves never delete their source when a copied key is gone or changed at the destination. - Audit `space-half-copy-removed` / `space-half-copy-remove-refused`; docs spaces-rename.md#half-copies. Multi-instance leftovers posted to #742. Live check: next time a dogfood leaves a half copy (or a deliberate S3 rename interrupt), run the action and check the kept list; added to #1005.
Cordy closed this issue 2026-10-28 17:46:27 +00:00
Sign in to join this conversation.
No labels
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#1026
No description provided.