Expand description
The master’s gRPC service and its loop: workers’ Control streams, parse uploads and
FetchInputs, over MasterCore (see archive/PROJECT.md, Master–worker protocol).
A Hub holds the core and each live worker’s outgoing stream; whatever the core decides
to send (assignments, cancels, acknowledgements) is delivered through it, from a stream’s
messages and from the loop’s ticks alike.
Structs§
- Hub
- The core and the workers’ outgoing streams.
- Lease
Lost - Another master took the lease over: this one’s view is stale, and it must end.
Constants§
- ALIVE_
INTERVAL - How often the loop beats while it waits between ticks (liveness, see
Hub::beat). - ALONE_
PER_ TURN - The most messages of a failed group handled one by one in a turn (M4B.3): the rest wait for the next, so a failing group doesn’t hold the lock for 40 transactions.
- DEFAULT_
MAX_ MESSAGE_ SIZE - The largest message from a worker unless set otherwise (
[grpc] max_message_size’s default; gRPC’s own, 4 MiB, is too small for a large root’s parse upload). - DEFAULT_
REFRESH_ LIMIT - The longest a gauge refresh may take unless set otherwise.
- INPUT_
CHUNK - The size of one
FetchInputschunk. - MESSAGES_
PER_ TURN - The most messages of one worker handled in one turn of the master’s lock: what is queued
gets through together, and a long queue doesn’t hold rounds and other workers up for long
(at most this many
Finished, each a few writes; the rest waits for the next turn). 80 from M5.1e’s stress runs (decision 484): bursts recorded fastest, steady throughput unchanged. - NOTIFICATION_
RETRY - How long the master waits before listening again after notifications failed.
- ROUND_
GAP - The least time between the end of a round and one a worker’s
Finishedwakes (decision 42B): none when the master was idle, so a finish starts its downstream tasks at once; under a stream of finishes at most 20 rounds a second, each taking what arrived meanwhile. - STREAM_
BUFFER - How many messages wait for a worker before it is taken for one that stopped reading.