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>
This commit is contained in:
parent
59410fc474
commit
900e148d8a
3 changed files with 35 additions and 739 deletions
|
|
@ -2124,27 +2124,6 @@ namespace GameCult.Caching
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Durable metadata available before a backing store hydrates a record payload.
|
||||
/// </summary>
|
||||
public sealed class CultPersistedRecordMetadata
|
||||
{
|
||||
/// <summary>Creates durable record metadata.</summary>
|
||||
public CultPersistedRecordMetadata(string key, string schemaId, string storedAt)
|
||||
{
|
||||
Key = key;
|
||||
SchemaId = schemaId;
|
||||
StoredAt = storedAt;
|
||||
}
|
||||
|
||||
/// <summary>Gets the durable record key.</summary>
|
||||
public string Key { get; }
|
||||
/// <summary>Gets the durable schema identity.</summary>
|
||||
public string SchemaId { get; }
|
||||
/// <summary>Gets the record commit timestamp.</summary>
|
||||
public string StoredAt { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Base class for CultCache persistence adapters.
|
||||
/// </summary>
|
||||
|
|
@ -2199,14 +2178,6 @@ namespace GameCult.Caching
|
|||
/// </summary>
|
||||
public abstract void PullAll();
|
||||
/// <summary>
|
||||
/// Pulls records selected by durable metadata. Non-indexed stores fall back to a full pull.
|
||||
/// </summary>
|
||||
public virtual void PullSelected(Func<CultPersistedRecordMetadata, bool> selector)
|
||||
{
|
||||
if (selector == null) throw new ArgumentNullException(nameof(selector));
|
||||
PullAll();
|
||||
}
|
||||
/// <summary>
|
||||
/// Returns whether the backing store knows a record is durable, including records left cold by selective hydration.
|
||||
/// </summary>
|
||||
public virtual bool ContainsDurableRecord(CultRecordKey key)
|
||||
|
|
|
|||
Loading…
Reference in a new issue