Open
Labels
P3Backlog: valid, low payoff-per-effortarea:storageStorage backends, nameservice, ledger lifecycle, index storage, cachestriage:needs-decisionBlocked on a product/design decision
Description
Problem
Three times now, a removal has reported success while the bytes it removed stayed on storage:
- A branch drop left behind the
@shared/dicts/blobs that only that branch referenced (fix(indexer): collect shared dictionary blobs, run the collector periodically, batch storage deletes #1862). - A hard drop of a nested ledger kept every file, because the exclusion meant for the nested ledger also covered the parent's own branch directory (
8519b4dbb, in fix: parse ledger ids once at the edge and key everything by a typed id #1958). - openraft's log purge reported done while the filesystem log kept the segment holding the purge point (feat(raft): compact_log removes compacted entries from disk #2391).
In each case the only thing checked was the layer that reported the removal. Nothing looked at storage itself.
Suggestion
Raised in review of #2391, which used two checks:
- In tests: after the removal, check the storage root for what was removed. feat(raft): compact_log removes compacted entries from disk #2391's
files_holding(fluree-raft-core/tests/kv_group.rs) searches every file under the root for a sentinel value.it_drop_ledger.rshastree/changed_since, which compare files before and after. Each removal path's tests would run a check like these. - At runtime, where the store can answer: fail the removal if storage still holds what it should have removed, as
compact_logdoes withRaftLogStore::first_retained_index.
Paths to cover:
- branch drop and hard ledger drop
- named-graph DROP
- index garbage collection and the storage sweep
- retention and erasure (feat: TTL, history retention and proof-verified permanent erasure #2280, on
next) - raft
compact_log(done in feat(raft): compact_log removes compacted entries from disk #2391)
Open questions
- A byte search only finds a value stored as written. For files that are compressed or encrypted at rest, a test may need to decode them, or instead list the files the removal should have deleted.
- Which paths can take a runtime check without adding a listing to every removal on remote storage.
- Whether the test helpers live in one shared support crate or stay in each crate.
Metadata
Metadata
Assignees
Labels
P3Backlog: valid, low payoff-per-effortarea:storageStorage backends, nameservice, ledger lifecycle, index storage, cachestriage:needs-decisionBlocked on a product/design decision
Activity