Skip to content

stacked_table: propagate remove_head errors other than NotFound - #10061

Open
petejm wants to merge 1 commit into
jj-vcs:mainfrom
petejm:stacked-table-propagate-remove-head-errors
Open

stacked_table: propagate remove_head errors other than NotFound#10061
petejm wants to merge 1 commit into
jj-vcs:mainfrom
petejm:stacked-table-propagate-remove-head-errors

Conversation

@petejm

@petejm petejm commented Aug 25, 2026

Copy link
Copy Markdown

Fixes #10060.

TableStore::remove_head intended to tolerate only a missing head marker but discarded every error. It now matches ErrorKind::NotFound and propagates the rest, mirroring SimpleOpHeadsStore::remove_op_head, which carries the same comment and already implements the intent correctly. Two new tests cover the tolerated NotFound path end-to-end and (unix) propagation of a real removal failure.

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have added/updated tests to cover my changes
  • I fully understand the code that I am submitting (what it does,
    how it works, how it's organized), including any code drafted by an LLM.
  • For any prose generated by an LLM, I have proof-read and copy-edited with
    an eye towards deleting anything that is irrelevant, clarifying anything
    that is confusing, and adding details that are relevant. This includes,
    for example, commit descriptions, PR descriptions, and code comments.

TableStore::remove_head discarded every error from removing a stale
table head marker, not just NotFound. Mirror
SimpleOpHeadsStore::remove_op_head, which handles the identical
situation correctly: NotFound is tolerated (another process, e.g. on
a distributed file system without working locks, may have already
removed the head), but any other I/O error (permission denied, full
disk, etc.) now propagates via a new TableStoreError::RemoveHeads
variant instead of being silently swallowed.

Fixes jj-vcs#10060

Assisted-by: Claude:claude-fable-5
@petejm
petejm requested a review from a team as a code owner August 25, 2026 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TableStore::remove_head discards all errors, not just the NotFound its comment intends to tolerate

1 participant