AccessWalking
The access walks of one bounded context, on every node, every AccessStampOptions.interval: each aggregate type's history stamped with the attributes of its aggregates' current states, where no commit stamped it with the type's current access schema (AccessSchema): a log an earlier version wrote, an import, an attribute the model declares since.
Claims: the type's log records one walk of the type (AccessWalks.walk), of an access schema, with the log's heads when it was claimed. A node claims its own schema's when none is recorded, and in place of another schema's once no node of that one is left (each node is a member of
<group>#access, serving<aggregate>@<schema hash>for its schema of each type): a rolling deployment that changes the schema starts the walk once the last node of the old one stopped, so the walk reaches what that node wrote. A walk of this node's schema, once completed, is not read again. A type whose log holds no store of its history yet (AccessWalks.holds) is not claimed, and its store is not created: the first run after its first append claims it.The walk: the node that holds the type's walk lease (
<group>#access-walk/<aggregate>) pages its aggregates (AccessWalks.aggregates, at most AccessStampOptions.walkBatch a page) and stamps each one's whole history with its current attributes (stampCurrent), one aggregate after another, each in statements of its own. After each page it records its cursor and count, so another node or a restart resumes it there; past the last page it is completed.Its pace: the walk is background work on the store the commands write to, so it takes a bounded share of it by construction (WalkPace): after each aggregate it waits so that its stamping took at most AccessStampOptions.walkShare of the time, and so that it stamps at most AccessStampOptions.walkRate a second. Its own statements slow down as the store's load rises, from any node, and the pace with them. Each second it reads whether the log store's writes pressed (ReplayGate.pressed): the share halves while they do, down to an eighth, and comes back an eighth a second while they do not. Its history reads run under the log store's query bulkhead (ReplayGate.replay); one the bulkhead refuses is a press too, and the aggregate is read again. A page holds as many aggregates as the last pace stamps in an interval, so the walk records its cursor about every interval, and it renews its lease within a page.
After the heads: the walk reaches every stream up to its heads. A stream after them that carries no attributes (a node of an earlier version still running, an import) is the follower's: AccessStamping stamps its aggregate when it reads it (covers).
The walks are observable in the registry of each log (the walk's schema, heads, cursor, count and completion), in the observer's ObservedEvent.AccessWalked and ObservedEvent.AccessStamped, and in the log.
Constructors
Functions
The share of the time the walk of type takes now on this node (WalkPace.share); null before it walked here.
Adds stamps, another store of type's history (an index of its streams, which a sink writes and follows the changes of itself), to what stampCurrent stamps: a walk reaches what it wrote before.
The walk of each type, as this node last read or claimed it.