You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
Bounded jobs: JobsOptions.MaxActiveStepsPerJob (or Job.MaxActiveSteps) keeps a sliding window of active steps and starts the next one as each step reaches an outcome. A resumed job rebuilds its window from storage. Off by default.
Step attempts: JobsOptions.MaxStepAttempts, StepRetryBackoff and MaxStepRetryBackoff, with Job.ShouldRetryStep deciding per failure. A failed attempt is scheduled again by the job with exponential backoff and counts as a failure only when its attempts run out. Default is one attempt.
IJobsManager.RetryFailedSteps(jobId) and Job.CanRetryFailedSteps run the failed steps of a job that completed with failures again. Opt-in per job type; resuming such a job is unchanged.
Optional step leases: JobsOptions.StepLeaseTimeout makes running steps record a heartbeat. The watchdog restarts a step only when its owner silo has left the cluster and its lease has expired; steps from older releases are left alone for one lease period.
IJobStepStorage.CountByStatus(jobId) as a default interface member, implemented for MongoDB, SQL and in-memory storage. Persisted steps gain an optional Attempt and Lease; existing data reads as attempt 1 with no lease.
JobsOptions.JobWatchdogInterval, StepDeliveryMaxAttempts, StepDeliveryRetryDelay and MaxStepDeliveryRetryDelay.
Changed
IJobsManager.Stop now returns Result<StopJobError> instead of Task; update callers that await it as a plain task if they need the outcome.
A running job is watched: it counts its steps in storage and finalizes itself when every step is done, counting Failed and CompletedWithFailure as failed, instead of staying Running when a step's report never arrived.
A step persists its terminal status first and then delivers it to the job, retrying with backoff until acknowledged. A delivery that never succeeds no longer marks the step failed; the job accepts each outcome once per step and attempt.
Fixed
Job.Stop no longer reports a stop that was not persisted. It restores the job's state and answers the new StopJobError.CouldNotPersistStop.