Commit graph CultLib/src/GameCult.Caching.MessagePack/DirectoryMessagePackBackingStore.cs
Author SHA1 Message Date
Meta Vens
900e148d8a Read only v4 directory stores; delete probes and selective hydration
DirectoryMessagePackBackingStore loses HydrationFilter, FlushStageProbe,
ReadStageProbe and their stage constants, ReadPersistedGeneration,
PullSelected, and every legacy path: the v2 directory-indexed and v3
immutable-pages formats, v1 inline records and split pages, the index
upgrade on flush, and the legacy page paths. CacheBackingStore.PullSelected
and CultPersistedRecordMetadata go with them.

A missing manifest is an empty store. An existing manifest whose
FormatVersion is not cultcache.store.v4.directory-content-addressed-pages
throws "Directory store {path} is {format}; only {v4} is readable." A clean
flush writes nothing, since there is no legacy index left to upgrade.

Tests deleted with the surface they injected through: the v1 missing-catalog
load, pages-before-manifest, fault-before-manifest (4 cases), same-timestamp
page, mutation-during-flush and reader-lease tests. The orphan-page test now
checks through a fresh store pull instead of ReadPersistedGeneration.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-13 16:50:08 +02:00
Meta Vens
85f2089f0e Delete CultCache wrappers and unused members
Removes FlushBackingStore, both PrepareForReloadOrShutdown overloads,
PullBackingStoreRecordsAsync, TryGet<T>, TryGetByName, TryGetByIndex,
Resolve<T>, the cache and store Logger, and LastSuccessfulFlushAtUtc on the
cache and stores. GetStoredDocuments<T> folds into GetAll<T>.

The soft flag goes from FlushAllBackingStores, ExecuteTransactionAsync,
CommitBatch and PushAll. It stays on FlushAsync(bool) because
CultCacheStudioWindow reflects on that signature until Cut 6.
CultMesh.FlushAsync and CultNetLocal.FlushAsync keep their parameter and
stop forwarding it.

The store's EntryAdded/EntryUpdated/EntryDeleted subjects become
protected internal Loaded/Unloaded callbacks set by the cache at attach.
AddStoredDocumentInternal is synchronous, so the GetAwaiter().GetResult()
bridges on the store subscriptions and the global materializer are gone.

Tests: drop the LastSuccessfulFlushAtUtc asserts; OpenAsync and GetAll tests
read through Get/GetAll; the persisted-global test proves the durable global
loads without staging a default instead of going through selective hydration;
the lease-before-observers test observes through CultCache.Watch; the
PullSelected selective-hydration test is deleted.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-13 16:44:11 +02:00
Meta Vens
b9cbd7561d Gate cache hydration and preserve legacy generations 2026-08-19 02:36:49 +02:00
Meta Vens
72153a46a2 Seal cache transactions and expose coherent generations 2026-08-19 02:17:38 +02:00
Meta Vens
e80383c33f Make CultCache transactions atomic to observers 2026-08-19 01:44:17 +02:00
Meta Vens
81ca92fe40 Keep CultCache readers on one committed generation 2026-08-19 00:56:37 +02:00
Meta Vens
eea8248877 Make CultCache page commits content-addressed 2026-08-19 00:11:20 +02:00
Meta Vens
cc89aae4a0 Make CultCache directory commits generation-atomic 2026-08-18 23:42:15 +02:00
Meta Vens
2194d14f0b Attribute CultCache page hydration by schema 2026-07-20 02:38:17 +01:00
Meta Vens
13dc1368dd Trace CultMesh local startup phases 2026-07-20 02:31:10 +01:00
Meta Vens
d69fa61412 Hydrate durable globals before defaults 2026-07-20 02:23:42 +01:00
Meta Vens
f714ceee43 Skip clean CultCache directory flushes 2026-07-20 02:12:22 +01:00
Meta Vens
085e177742 Make CultCache hydration subscription-shaped 2026-07-20 01:48:56 +01:00
Meta Vens
916054fa0e Parallelize paged CultCache hydration 2026-07-20 00:46:38 +01:00
Meta Vens
49c43baa4c Preserve dirty CultCache state during pulls 2026-07-18 23:19:45 +01:00
Meta Vens
a32271d7c2 Make CultCache multiprocess pulls incremental 2026-07-18 22:25:13 +01:00
Meta Vens
fe55bff2e0 Precommit directory store schema catalog 2026-07-13 17:18:07 +01:00
Meta Vens
14a4bc021f Harden directory MessagePack record replacement 2026-07-02 21:00:36 +01:00
Meta Vens
a0b31b8f2a Recover schema-stamped cache records across runtimes 2026-06-27 14:34:53 +01:00
Meta Vens
086522029c Page CultCache MessagePack records 2026-05-31 17:32:42 +01:00