Caching docs: MarkWritten refuses an entry the store does not hold (contract, CHANGELOG)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
afd799ba8d
commit
22eaaabeb2
2 changed files with 11 additions and 8 deletions
|
|
@ -232,9 +232,11 @@ not the one this cache decodes it as. A value change mints a `storedAt`
|
||||||
strictly later than the record it replaces; writers bump a minted timestamp by
|
strictly later than the record it replaces; writers bump a minted timestamp by
|
||||||
one tick when it is not later. An entry loaded under compatible schema drift
|
one tick when it is not later. An entry loaded under compatible schema drift
|
||||||
keeps its persisted id until its store rewrites it; a store records each
|
keeps its persisted id until its store rewrites it; a store records each
|
||||||
record its completed write rewrote with the protected
|
record its completed write rewrote with the protected instance method
|
||||||
`CacheBackingStore.MarkWritten`, and one that does not leaves the entry's
|
`CacheBackingStore.MarkWritten`, which refuses an entry that is not the one
|
||||||
`Expect` failing closed until the next pull. A whole-file flush or
|
the store holds in its own `Entries` at that key, so a store cannot mark
|
||||||
|
another store's or another cache's copy. A store that does not mark leaves
|
||||||
|
the entry's `Expect` failing closed until the next pull. A whole-file flush or
|
||||||
unconditional commit rewrites every record under the writer's current schema
|
unconditional commit rewrites every record under the writer's current schema
|
||||||
and keeps its `storedAt`, so another cache's `Expect` on a drifted record it
|
and keeps its `storedAt`, so another cache's `Expect` on a drifted record it
|
||||||
read before that rewrite fails until it re-reads the store.
|
read before that rewrite fails until it re-reads the store.
|
||||||
|
|
|
||||||
|
|
@ -31,11 +31,12 @@ All notable changes to this package are documented in this file.
|
||||||
stored under, as its backing store last read or wrote it. It differs from
|
stored under, as its backing store last read or wrote it. It differs from
|
||||||
`Descriptor.SchemaId` only for a record loaded under compatible schema drift
|
`Descriptor.SchemaId` only for a record loaded under compatible schema drift
|
||||||
that its store has not rewritten since.
|
that its store has not rewritten since.
|
||||||
- `CacheBackingStore.MarkWritten(CultStoredDocument)` (protected): a backing
|
- `CacheBackingStore.MarkWritten(CultStoredDocument)` (protected instance
|
||||||
store records that its completed durable write stored a record under its
|
method): a backing store records that its completed durable write stored a
|
||||||
descriptor, so `PersistedSchemaId` follows the rewrite. The single-file and
|
record under its descriptor, so `PersistedSchemaId` follows the rewrite. It
|
||||||
directory stores mark every record they rewrite; a custom store calls it for
|
throws `ArgumentException` for an entry that is not the one the store holds
|
||||||
each record its own write rewrote.
|
in its own `Entries`. The single-file and directory stores mark every record
|
||||||
|
they rewrite; a custom store calls it for each record its own write rewrote.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue