Cancel
How vigilo run cancel records durable revocation, delivers it to execution placements, and reports cancellation progress.
Execution Flow
Decision Flow
The command atomically records execution control and pending delivery destinations. It attempts bounded direct database delivery; coordinators retry outstanding work without requiring the submitting process to remain connected. RabbitMQ carries workload notifications and domain events, not control delivery.
Workers observe control through their existing lease heartbeat. Revocation stops new cases and cancels supported in-flight operations. Results that finish safely are persisted under the existing lease fences. Application on a database is distinct from worker quiescence: cleanup waits until live chunk leases have been released or expired on every destination. It then cancels unfinished work, records terminal chunk receipts, and commits the cancellation summary and event together. If the caller retries after that commit, the stored summary and event retain the original counts. Committed results and the shared finalized dataset are retained.
A response with meta.terminal: false means cancellation remains pending. Run status and watch report lifecycle progress; Client::run_control_status
reports applied, quiescent and settled control progress separately. Unreachable placements delay
completion; there is no instantaneous global stop guarantee.
Library execution control also supports paused and enabled. Paused chunks
cannot acquire new leases. A worker drains its already allocated batch of cases under
the existing concurrency and deadline limits, then stops before allocating another
batch. Already allocated calls may start after pause is observed; their attempts
are retained without an extra allocation or cleanup query. Revocation interrupts
that drain and cancels supported pending calls. Resume permits fresh claims; it cannot
restore revoked work or restart a terminal run. Revisions prevent delayed delivery
from overwriting a newer decision. Newly seeded chunks inherit their run control;
shard destinations reconcile control after copying and before opening admission.
Each delivery applies its claimed work identity to the execution transaction. A non-key run-row lock serializes control changes while allowing finishing results to validate their parent foreign keys and release their chunk locks. Quiescence reads, acknowledgments and retry updates use the same identity in their own transactions. Control connections are released before remote I/O; revisions and claim tokens fence delayed acknowledgments and retries.
After every destination is quiescent, a settlement claim carries the run identity through control-state changes, route discovery, local cleanup and final summary publication. Each phase uses its own scoped transaction. Partial admission closes local admission before cleanup so an interrupted creator cannot restore work. Completed executions and their evidence remain intact; retries reuse existing receipts and the cancellation event. Acknowledgement and retry updates require the matching settlement revision and token.