Skip to content

Tombstone must append before dropping the key from the index - #15

Open
paulocsanz wants to merge 2 commits into
beyondoss:mainfrom
paulocsanz:dst/b39-tombstone-after-append
Open

Tombstone must append before dropping the key from the index#15
paulocsanz wants to merge 2 commits into
beyondoss:mainfrom
paulocsanz:dst/b39-tombstone-after-append

Conversation

@paulocsanz

Copy link
Copy Markdown
Contributor

tombstone / tombstone_cond removed the key from the index and then appended. ENOSPC (or any append error) left RAM empty and disk without a tombstone. Retry returned Ok(None) — "already deleted" — so GET-of-expired (the hot path) never retried the write. Reopen replayed the PUT and the key came back.

put_full already appends first. Same order here. Stripe lock still serializes the key.

Two commits: failing ENOSPC test, then append-then-remove.

index.remove before append means ENOSPC leaves the key gone in RAM.
Retry returns Ok(None) and never writes a tombstone; reopen replays
the PUT.
A failed disk write left the key gone in RAM, so retry returned
Ok(None) and never wrote a record. Reopen replayed the PUT.
Same order as put_full: durable first, then the index.
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.

1 participant