diff --git a/contracts/cultnet/cultnet-distributed-database.md b/contracts/cultnet/cultnet-distributed-database.md index 76dd22d3..62bde066 100644 --- a/contracts/cultnet/cultnet-distributed-database.md +++ b/contracts/cultnet/cultnet-distributed-database.md @@ -146,7 +146,11 @@ A malformed put or delete is `message_invalid`, not a per-operation code: the pe commit's changes as one commit, so the replica judges the result (a swap of two unique-index values) and not the state between records. A replica whose cache refuses a commit is faulted, never silent. `commitId` is opaque and valid only within the subscription. A server that re-evaluates a subscription (C# `Reconcile`) sends its diff as one such commit, and a server - never forwards a commit that its last snapshot to the subscription already reflects. The C# subscription server and database server tag commits; other runtimes adopt next. + never forwards a commit that its last snapshot to the subscription already reflects. A replica may bound how many + changes it buffers across incomplete commits (the C# client: `MaxBufferedChanges`, 1,000,000). One bound covers every + commit, whatever made it, a `Reconcile` diff included: a commit announcing more faults the replica loudly, and a faulted + consumer resubscribes for a snapshot, which is one message and has no such bound. A server does not split a commit to + fit a replica's bound. The C# subscription server and database server tag commits; other runtimes adopt next. - The C# writer sets every key of a `database_change_raw` message, nil where unset: a removed change carries `document` nil, an added or updated one `recordKey` and `schemaId` nil. The schema accepts those nils; an added or updated change still needs a document, and a removed one a `recordKey` and `schemaId`.