Soft flush: the reader's own answer decides (no second stat, protocol default included); pin the readable-empty store, spy the flag through Mesh and host, changelog the breaking PushAll
Some checks failed
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Has been cancelled
Some checks failed
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Has been cancelled
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
fb80e32749
commit
80eed16c0d
9 changed files with 170 additions and 19 deletions
|
|
@ -247,9 +247,11 @@ public sealed class DirectoryMessagePackBackingStore : CacheBackingStore
|
|||
|
||||
Directory.CreateDirectory(_manifestFile.DirectoryName!);
|
||||
using var commitLease = AcquireCommitLease(wait: true, create: true);
|
||||
var (manifest, catalogBytes) = ReadManifest();
|
||||
// A soft flush writes only where no manifest is; a manifest ReadManifest read stays as it is, its staged writes staged.
|
||||
if (soft && File.Exists(_manifestFile.FullName))
|
||||
var manifestBytes = ReadManifestBytes();
|
||||
var (manifest, catalogBytes) = ParseManifest(manifestBytes);
|
||||
// A soft flush writes only where no manifest is: the reader's answer (null is absent), not a second look at the path.
|
||||
// A manifest it read stays as it is, its staged writes staged.
|
||||
if (soft && manifestBytes != null)
|
||||
return;
|
||||
RefuseUndeclaredOnDisk(manifest, StagedKeys, Array.Empty<CultStoredDocument>(), Array.Empty<CultStoredDocument>(), Array.Empty<string>());
|
||||
if (IsDirty)
|
||||
|
|
|
|||
Loading…
Reference in a new issue