Expand description
Logic and types for all appends executed by the Coordinator.
Runtime table appends, registrations, and forgets are serialized by the
GroupCommitter. FIFO order is required so appends cannot overtake registration or
forgetting.
For each command, the committer:
- allocates a write timestamp from the shared oracle,
- advances the catalog upper to
WriteTimestamp::advance_to, - writes the txns shard, retrying
InvalidUppersfrom step 1, and - applies the successful write to the oracle.
Step 2 keeps the catalog readable at the oracle read timestamp. It also enforces fencing for a post-fence retry: the fresh oracle timestamp’s advance frontier is above the stale process’s cached catalog upper, so the advance reaches Persist and observes the fence before another txns write.
On environmentd bootstrap in read/write mode, system-table snapshots cannot complete until a
txns-shard write has advanced the table uppers. A stale write either linearizes before this
barrier and is observed by the snapshot, or conflicts and follows the fenced retry path above.
This relies on generations sharing the oracle.
Work that requires coordinator state is returned via Message::GroupCommitApplied.
Structs§
- Builtin
Table Append - Helper struct to run a builtin table append.
- Builtin
Table Append Completion - Completion handle for a builtin-table append response barrier.
- Deferred
Plan - Describes a plan that is awaiting
WriteLocks. - Deferred
Write - Group
Commit Notifier - A handle that allows us to notify the coordinator that a group commit should be run at some point in the future.
- Group
Commit Permit - A permit to run a group commit, this must be kept alive for the entire duration of the commit.
- Group
Commit 🔒Request - A group commit staged on the coordinator loop for the
GroupCommitter. - Group
Commit Waiter - A handle that returns a future when a group commit needs to be run, and one is not currently being run.
- Group
Committer 🔒 - Serializes runtime txns-shard writes off the coordinator loop.
Enums§
- Builtin
Table 🔒Update Source - Describes what action triggered an update to a builtin table.
- Deferred
Op - An operation that was deferred waiting on a resource to be available.
- Pending
Write 🔒Txn - A pending write transaction that will be committing during the next group commit.
- Table
Write 🔒Cmd - User
Write 🔒Responder - Where to deliver the result of a
PendingWriteTxn::Userwrite.
Statics§
- REQUIRED_
BUILTIN_ 🔒TABLES - Tables that we emit updates for when starting a new session.
Functions§
- notifier
- Returns two sides of a “channel” that can be used to notify the coordinator when we want a group commit to be run.
- spawn_
group_ 🔒committer - waiting_
on_ 🔒startup_ appends - When we start a
Sessionwe need to update some builtin tables, but we don’t want to wait for these writes to complete for two reasons:
Type Aliases§
- Builtin
Table Append Notify Futurethat notifies when a builtin table write has completed.