Caching: a plain flush and a directory write refuse a store another process stamped newer since attach
Single-file PushAll reads the format stamp under the lock and refuses cultcache.store.v<N> with N > 2; the directory store throws NotSupportedException for N > 4 from the manifest parse every write already runs. An unreadable stamp keeps today's behaviour. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5fd72ba216
commit
d44188637d
4 changed files with 159 additions and 0 deletions
|
|
@ -548,6 +548,12 @@ public class SingleFileMessagePackBackingStore : SingleFileBackingStore
|
|||
return snapshot;
|
||||
}
|
||||
|
||||
protected override string? ReadFormatVersion(byte[] data)
|
||||
{
|
||||
var reader = new MessagePackReader(data);
|
||||
return reader.ReadArrayHeader() > 0 ? reader.ReadString() : null;
|
||||
}
|
||||
|
||||
protected override byte[] SerializePayload(object document)
|
||||
{
|
||||
return CultDocumentMessagePackSerialization.SerializeUntyped(document, document.GetType(), Registry);
|
||||
|
|
|
|||
Loading…
Reference in a new issue