Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions resources/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,17 +341,7 @@ bit is persisted, so it cannot follow a renumbered rocksdb-js constant without a
`unitTests/resources/caching-rocks-database.test.js` ('marks a record whose version was reused…') pins
the layout against raw stored values.

A fill's puts carry no condition of their own: on LMDB the `LMDBTransaction` `ifVersion` block holds
the condition with the primary, index and audit puts in one native write transaction (a per-put
`ifVersion` cannot stop the index writes, and on the unversioned audit store it drops the write); on
RocksDB a conflict retries the commit handler. A write the source makes to the same key through its
context joins the fill's transaction, where neither check sees it. RocksDB reads the fill's
`existingEntry` through that transaction; LMDB's optimistic path reads the committed record, so on
LMDB the fill yields to any earlier same-key write not skipped (`followsAppliedWrite`), and a no-op
`update()` removed at validation leaves the per-key chain (`LMDBTransaction.removeWrite`). On LMDB an
invalidated record keeps its local time only while its audit entry exists to be replaced
(`recordUpdater`), since an appended entry is keyed by the last assigned time.
`unitTests/resources/sourceFillConditionalWrite.test.js` pins both engines.
A fill's puts carry no condition of their own: on LMDB the `LMDBTransaction` `ifVersion` block holds the condition with the primary, index and audit puts in one native write transaction (a per-put `ifVersion` cannot stop the index writes, and on the unversioned audit store it drops the write); on RocksDB a conflict retries the commit handler. A write the source makes to the same key through its context joins the fill's transaction, where neither check sees it. RocksDB reads the fill's `existingEntry` through that transaction; LMDB's optimistic path reads the committed record, so on LMDB the fill yields to any earlier same-key write not skipped (`followsAppliedWrite`), and a no-op `update()` removed at validation leaves the per-key chain (`LMDBTransaction.removeWrite`). On LMDB an invalidated record keeps its local time only while its audit entry exists to be replaced (`recordUpdater`), since an appended entry is keyed by the last assigned time. `unitTests/resources/sourceFillConditionalWrite.test.js` pins both engines.

## Blob orphan cleanup: pre-saved files outlive cancelled commits

Expand Down
Loading