CultNetDatabaseServer: a selection skips cached rows no shard owns instead of failing
ResolveShard now throws for an unowned schema, so one such cached row would have failed the whole selection. The server passes a row filter (CultNetDatabase.Owns) to CreateSelectionResponse, which gains an optional rowFilter that SelectPage already took, so those rows are not part of what the database serves and the rest is answered. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
e79882a8ec
commit
dac712b09c
4 changed files with 29 additions and 2 deletions
|
|
@ -1922,6 +1922,8 @@ namespace GameCult.Networking
|
|||
private CultNetShardDescriptor ResolveShardInternal(CultDocumentDescriptor descriptor, CultRecordKey key) =>
|
||||
FindShard(descriptor, key) ?? throw new CultNetUnownedSchemaException(descriptor.SchemaId, key);
|
||||
|
||||
internal bool Owns(CultDocumentDescriptor descriptor, CultRecordKey key) => FindShard(descriptor, key) != null;
|
||||
|
||||
private CultNetShardDescriptor? FindShard(CultDocumentDescriptor descriptor, CultRecordKey key) =>
|
||||
_shards.FirstOrDefault(shard => shard.Matches(descriptor, key));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue