SingleFileBackingStore: name its gate call apart from the base rule
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
0c785446fd
commit
dc7be51a11
1 changed files with 2 additions and 2 deletions
|
|
@ -5093,7 +5093,7 @@ namespace GameCult.Caching
|
|||
RefuseUndeclaredOnDisk(durable, upserts, removals, checks);
|
||||
if (upserts.Count == 0 && removals.Count == 0 && (checks.Any() || StagedChecks.Count > 0))
|
||||
return Array.Empty<(CultStagedRecord, string)>();
|
||||
RefuseWriteIntoMovedStore(durable, upserts, removals);
|
||||
RefuseWriteIntoMovedFile(durable, upserts, removals);
|
||||
var durableRecords = durable?.Snapshot.Records ?? Array.Empty<CultPersistedRecord>();
|
||||
// A record written over one the store holds is stored at a storedAt later than the one it replaces, whoever wrote that.
|
||||
var replaced = durableRecords.ToDictionary(record => record.Key, record => record.StoredAt, StringComparer.Ordinal);
|
||||
|
|
@ -5178,7 +5178,7 @@ namespace GameCult.Caching
|
|||
return false;
|
||||
}
|
||||
|
||||
private void RefuseWriteIntoMovedStore(Durable? durable, IReadOnlyCollection<CultStagedRecord> upserts, IReadOnlyCollection<string> removals) =>
|
||||
private void RefuseWriteIntoMovedFile(Durable? durable, IReadOnlyCollection<CultStagedRecord> upserts, IReadOnlyCollection<string> removals) =>
|
||||
RefuseWriteIntoMovedStore(
|
||||
() => (durable?.Snapshot.Records ?? Array.Empty<CultPersistedRecord>())
|
||||
.ToDictionary(record => record.Key, record => durable!.Version(record.Key), StringComparer.Ordinal),
|
||||
|
|
|
|||
Loading…
Reference in a new issue