Cursor separation¶
A node holds four positions. Each one is advanced by a different authority, confirmed by a different peer, lives for a different length of time, and is restored from a different source. The node therefore keeps four records and reconciles them through its own ordering rules. This page compares what each position is for, who moves it, how long it lives, and where its truth sits when the node's copy is gone.
The four positions side by side¶
| Position | Advanced by | Confirmed by | Lifetime | Truth when the node's copy is gone |
|---|---|---|---|---|
| Assignment watch | The control plane's stream revision | The node's own write | The node's volume, across restarts | The control plane's assignment ledger, through snapshot and delta resync |
| Status acknowledgement | The control plane accepting an envelope | The control plane | One xratud process |
The assignment ledger: an unconfirmed assignment's lease lapses and it is dispatched again |
| Telemetry outbox checkpoint | An accepted delivery batch | The control plane's ingest | One xratud process |
The record's own source: the ledger, the kernel's continuity store, or the observability bucket |
| Kernel return sequence | The kernel's reported next sequence | The node, by acknowledging | One xratud process, per project runtime |
The kernel's continuity store, which holds the envelopes and the lane cursor |
Where each one sits¶
flowchart TB
subgraph CP["CONTROL PLANE"]
direction TB
LED[("Assignment ledger")]
ING["Status and telemetry ingest"]
end
subgraph VOL["NODE VOLUME, across restarts"]
direction TB
WC[("Assignment watch cursor")]
end
subgraph PROC["XRATUD PROCESS, new each start"]
direction TB
SA[("Status ack state")]
OB[("Outbox checkpoints")]
KR[("Kernel return cursors")]
end
subgraph KERN["PROJECT KERNEL"]
direction TB
CONT[("Continuity store")]
end
LED --> WC
SA --> ING
OB --> ING
CONT --> KR
Assignment watch cursor is the only position on the NODE VOLUME. The three
in XRATUD PROCESS are rebuilt from Assignment ledger and Continuity store.
Why the inbound position is kept on the volume¶
The inbound position is the only one whose loss costs work. A node that forgets where it was in the assignment stream has to be told again by the control plane, and the resync that does it is a snapshot of every active assignment the node holds a lease on, plus a resume point, so the position is written to the volume and survives.
The three others describe things the node was going to say. Their loss costs a repetition: a status report sent twice, a log batch delivered twice, a run of kernel envelopes replayed. Every one of those is absorbed by a dedupe check at the receiving end. See Idempotency and replay-safe reprocessing.
The four revisions are one record¶
The assignment watch record holds four revisions in one file. They are four marks on the same stream, kept together because they must satisfy an order relative to each other and because they are read and written as one unit under one digest. The four positions on this page sit in different lanes, under different authorities, and share no ordering. See The assignment cursor.
The one rule all four share¶
Each position advances only on evidence from the peer that owns the far end, and the claim is checked against what that peer reported available:
assignment watch the control plane returns a higher stream revision
status acknowledgement the control plane accepts the envelope at that sequence
outbox checkpoint the batch was accepted and its records deleted
kernel return the proposed sequence is at or under the kernel's reported maximum
Only that peer can establish where the far end stands. See Gap handling.
Related¶
- Why the data plane keeps cursors for the problem all four solve.
- Durable node state layout for the files and their paths.
- Rebuilding node state after restart for the order they come back in.