fix(grpc-data): size projected unary reservations from the node's shape (#960); per-item status for projected items refused at create (#961)

#960: a projected read reserves 16 KiB for a fixed-size scalar (16 KiB + 256 B/element for a
fixed-length fixed-size array) instead of the whole MaxPendingBytes, so the default 1 MiB admits
64 concurrent scalar reads; String/Bytes/variable arrays keep the whole cap, and a waiting
whole-cap read holds back smaller ones for 100 ms (anti-starvation). Writes reserve
16 KiB + identifiers + 3 x the value bound (what the origin's DataWriteExecutor admits the batch
against). Monitored-item renewals reserve 256 KiB. Measured: 4 x 250 ms maxAge=0 reads 1016 ms /
1 in flight -> 285 ms / 4 in flight.

#961: TryAcquireProjectedItem reports BadResourceUnavailable for a stream-capacity refusal; the
node manager's CreateMonitoredItem override turns the item manager's ServiceResultException into
that item's status (was a whole-request fault), and an authority race is re-classified outside
Lock like the per-item probe.
This commit is contained in:
Joseph Doherty
2026-12-01 20:34:35 -05:00
parent 92da56c071
commit 75e6ff9af8
14 changed files with 644 additions and 48 deletions
+1 -1
View File
@@ -262,7 +262,7 @@ consumer scope, exports, mappings, credential provisioning and recovery.
| `MaxMessageBytes` / `MaxConcurrentCalls` | `1048576` / `64` | Message-size and concurrent unary-call admission. |
| `MaxStreams` / `MaxStreamsPerPrincipal` | `256` / `8` | Global and per-principal stream bounds. |
| `MaxMonitoredItems` | `10000` | Listener monitored-item bound. |
| `MaxTransportBytes` / `MaxPendingBytes` | `67108864` / `1048576` | Retained transport and pending-work byte bounds. |
| `MaxTransportBytes` / `MaxPendingBytes` | `67108864` / `1048576` | Retained transport and pending-work byte bounds. `MaxPendingBytes` is also the consumer's projected unary budget: since #960 a projected Read reserves 16 KiB for a fixed-size scalar (64 fit the default), a String / Bytes / variable-array read the whole `min(4 MiB, MaxPendingBytes)` — raise it for concurrent reads of those. |
| `MaxSessionLifetime` | `01:00:00` | Finite stream-session lifetime. |
| `UnaryTimeout` / `StreamCommandTimeout` | `00:00:30` / `00:00:05` | Finite ingress unary and stream-command deadlines. |
| `CredentialBundlePath` / `TrustBundlePath` | unset | Independent node-local credential and trust provisioning mounts. |