pinnedOwner
When set, this task is owned by exactly this peer regardless of the hash ring; absent (null) ⇒ ring-assigned.
Pinned execution decouples who-runs from the consistent-hash ring: only the named peer claims and runs the task, no other peer ever does, and if the pinned owner is partitioned or absent the task stays pending (it does not re-home to a survivor) until the owner returns. This makes inherently data-local workloads expressible — e.g. federated learning, where only the data owner can run its own training step on its private local data — and doubles as task affinity / sticky placement. Use WarpNode.enqueueLocal for the common "pin to me" case.
Samples
val alice = PeerId("alice")
// Ring-assigned: hash(taskId) picks the owner (work-stealing).
val free = TaskDescriptor(OpId("train"), byteArrayOf(1, 2, 3))
check(free.pinnedOwner == null)
// Pinned: only `alice` ever claims and runs this task — it never re-homes.
val pinned = TaskDescriptor(OpId("train"), byteArrayOf(1, 2, 3), pinnedOwner = alice)
check(pinned.pinnedOwner == alice)Content copied to clipboard