C#: database server answers writes with write_admitted / error.v1 (write-receipt spec)
Some checks failed
CultMesh QUIC native / Build win32-x64 (pull_request) Has been skipped
CultMesh QUIC native / Build linux-x64 (pull_request) Has been skipped
CultMesh QUIC native / Release native binaries (pull_request) Has been skipped
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Failing after 5m46s
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Successful in 36s
Some checks failed
CultMesh QUIC native / Build win32-x64 (pull_request) Has been skipped
CultMesh QUIC native / Build linux-x64 (pull_request) Has been skipped
CultMesh QUIC native / Release native binaries (pull_request) Has been skipped
CultMesh portability and performance / ubuntu-latest reactive semantics and leases (pull_request) Failing after 5m46s
CultMesh QUIC native / Verify committed binaries match SHA256SUMS (pull_request) Successful in 36s
Opt-in per connection by the first hello (or first write); the server answers a capable hello with its own. A put or delete commits, then gets write_admitted under its id; every refusal is error.v1 with the id (an unreadable frame carries the id when it still holds one). (actor, messageId) dedupe is bound to the content hash and asked only after the write authority grants; same id other content is message_invalid. The shard write forwarder says hello, waits for the primary's receipt, and the server relays only what the primary answered under the original id. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
45e95984e5
commit
b0ea18371f
7 changed files with 985 additions and 38 deletions
|
|
@ -406,7 +406,19 @@ namespace GameCult.Networking
|
|||
var frame = transport.Receive(bytes);
|
||||
if (string.Equals(frame.ChannelId, "schema", StringComparison.Ordinal))
|
||||
{
|
||||
var cultNetMessage = LiteNetLibTransportConnection.DecodeSchema(frame);
|
||||
ICultNetSchemaMessage cultNetMessage;
|
||||
try
|
||||
{
|
||||
cultNetMessage = LiteNetLibTransportConnection.DecodeSchema(frame);
|
||||
}
|
||||
catch (Exception ex) when (transport.WriteReceipts != null)
|
||||
{
|
||||
// A receipt-capable peer is told which frame was unreadable (by its id, if the frame still holds one).
|
||||
Logger.LogWarning($"CultNet schema frame unreadable: {ex.Message}");
|
||||
transport.AnswerUnreadableSchemaFrame(frame.Payload);
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.LogDebug($"Received CultNet schema message {cultNetMessage.SchemaVersion}");
|
||||
await HandleCultNetSchemaMessageAsync(peer, user, cultNetMessage).ConfigureAwait(false);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue