Merge main at cultlib-unity-v2.0.0 (42dce361) into C2a: one owner per collision
Identity: C2a's StoredSchemaId/StoredVersion owns; main's PersistedSchemaId, PersistedIdentity and both MarkWritten are deleted. Stamp rule: ReadStore judges the stamp before the body. Flush over damage refuses (merge-r1-precedence). Mesh single-file writes route through SingleFileMessagePackBackingStore. TS: store-file.ts commits, C2a's header handling kept. Rust: C2a's readable_store_format in front of the grown decoder. Build not yet verified at this commit. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
f2b3569822
210 changed files with 27332 additions and 899 deletions
|
|
@ -239,8 +239,13 @@ its version, whatever storedAt it carries.
|
|||
wait bound (30 seconds).
|
||||
- A conditional commit on a store with staged single-record writes throws:
|
||||
flush first.
|
||||
- Single-file stores lock a sidecar `<path>.lock` opened exclusively. Directory
|
||||
stores use their existing commit lease.
|
||||
- Single-file stores lock a sidecar `<path>.lock`: C# by an exclusive
|
||||
(share-none) open, Rust and TypeScript by an exclusive `LockFileEx` on a
|
||||
shared open on Windows, and every runtime by `flock(LOCK_EX)` on Unix. Each
|
||||
excludes the others (TypeScript tests: "a TypeScript write waits while a C#
|
||||
writer holds the store lock", "... a Rust writer ...", "a C# writer waits
|
||||
while a TypeScript writer holds the store lock", "a Rust writer waits ...").
|
||||
Directory stores use their existing commit lease.
|
||||
- A directory store with no `.commit.lock` (no writer has created it yet, or
|
||||
the store was copied without it) gives a pull no lease, and opening it
|
||||
creates none. Such a pull re-reads the manifest after loading its pages and
|
||||
|
|
@ -280,8 +285,11 @@ refuses to replace a file whose header it cannot read, and leaves it as it was.
|
|||
in that store, and leaves the store clean.
|
||||
- A conditional commit lands the batch onto the file as it is under the lock.
|
||||
|
||||
A store is written by one runtime at a time. Whether a Rust `fs2` lock and a C#
|
||||
exclusive open of the same lock file exclude each other is not established.
|
||||
C#, Rust and TypeScript writers exclude each other on the shared lock file;
|
||||
Python takes no cross-process lock yet (`variants:follow_up:py-shared-write-lock`),
|
||||
and Rust's open fails rather than waits while a C# writer holds the lock
|
||||
(`variants:follow_up:rust-lock-open-waits`). Another runtime need not obey the
|
||||
`storedAt` rule.
|
||||
|
||||
## Serialization options
|
||||
|
||||
|
|
|
|||
|
|
@ -15,5 +15,6 @@
|
|||
<PackageReference Include="R3" Version="1.3.0" />
|
||||
<PackageReference Include="ConcurrentHashSet " Version="1.3.0" />
|
||||
<InternalsVisibleTo Include="GameCult.Caching.Tests" />
|
||||
<InternalsVisibleTo Include="GameCult.Caching.MessagePack" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Loading…
Reference in a new issue