c8b3a2281a
Proto foundation + gateway-side of the size/backpressure pass: - IPC-02: add GatewayHello.max_frame_bytes (regen Generated/); gateway sends its negotiated worker-frame max in the handshake so the worker can adopt it instead of a hard-coded default. Worker read-half lands separately. - IPC-03: give the pipe frame max envelope-overhead headroom above the public gRPC cap (WorkerFrameProtocolOptions.EnvelopeOverheadReserveBytes = 64 KiB; default Worker.MaxMessageBytes bumped to 16 MiB + reserve), cross-validate the headroom at startup, and pre-check command envelope size in WorkerClient so an oversized command fails only that correlation (ResourceExhausted) instead of faulting the whole session. - IPC-04: reject DrainEvents max_events above a public ceiling in the request validator (worker per-reply cap lands with the worker half). Docs: GatewayConfiguration, WorkerFrameProtocol, gateway.md. Tests: headroom validation, DrainEvents bound, oversized-command per-command failure (pipe-harness, verified on windev).
21 lines
616 B
C#
21 lines
616 B
C#
namespace ZB.MOM.WW.MxGateway.Server.Workers;
|
|
|
|
public enum WorkerClientErrorCode
|
|
{
|
|
InvalidState,
|
|
ProtocolViolation,
|
|
PipeDisconnected,
|
|
CommandTimeout,
|
|
WorkerFaulted,
|
|
HeartbeatExpired,
|
|
ShutdownTimeout,
|
|
GatewayShutdown,
|
|
WriteFailed,
|
|
PendingCommandLimitExceeded,
|
|
|
|
// The serialized command envelope exceeds the negotiated worker-frame maximum. Rejected at the
|
|
// enqueue boundary so only the offending command fails (mapped to ResourceExhausted) instead of
|
|
// the oversized frame reaching the write loop and faulting the whole session (IPC-03).
|
|
CommandTooLarge,
|
|
}
|