Skip to content

Release v1.20.0

Choose a tag to compare

@github-actions github-actions released this 17 Oct 02:05
c7d7cb3

A job's owner can now stop a job and know when it has really stopped: StopAndDrain answers only once no step work can run for the job any more.

Added

  • IJobs.StopAndDrain(key, jobId, timeout) stops a job and waits until its steps are drained. It answers Drained once no step code runs for the job, each step's outcome and final checkpoint are persisted, and OnStepCompletedOrStopped and OnStopped have finished; otherwise TimedOut (call again to continue), Completed, NotFound or UnknownJobType. Pass TimeSpan.Zero to poll without blocking. This adds a member to IJobs, so a hand-written IJobs implementation must add it. See Jobs. (part of #81)
  • IJobDrain lets a job grain be drained directly, and IJobStepDrain is the protocol the job uses to drain its steps. (part of #81)

Changed

  • A job whose silo dies during a drain finishes the drain when it next activates and is never resumed; Resume is refused while a drain is pending. (part of #81)
  • A step's stop report from before a Resume no longer counts against the resumed job, and a step stopped just before the resume is started again in the resumed execution. Silos older than 1.20 keep the earlier behavior. (part of #81)
  • OnStepCompletedOrStopped can run again for a step after a crash, or not at all, so it must be idempotent and owners should not take results from it alone. Use StopAndDrain only once every silo runs 1.20 or later. (part of #81)