ExecutionLease

Whether the command the kernel executes in this coroutine runs on the owner of its log partition (C2 and C4), as the router that chose this node says:

  • HELD: this node holds the partition's lease and accepts its commands. Only then may a decide that does I/O skip the request-id lookup, on a miss of a complete set of the aggregate's recent requests.

  • NOT_HELD: the command runs here without the lease, degraded to Local or for a partition about to be acquired. Its states are not cached: another node may be committing to the aggregate meanwhile.

Without either (a Local router, a context without a lease group, a command intake), states are cached as before and a decide that does I/O always looks its request id up on a miss.

The log reads it too: the coroutine of an EventLog.append or EventLog.appendAll carries the mark of the commands whose streams it appends. A backend that gives a partition's owner its sequences ahead may give an append under NOT_HELD only those it writes, so a command run without the lease leaves none open behind it (MongoDB's blocks).

Types

Link copied to clipboard

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun toString(): String