Repository navigation
Conversation
…unning - a step outliving the driver lease was reclaimed and run twice, because only its own lease is renewed
…hutdown - the pump drains in StoppingAsync, before Kestrel stops: no new claims, unstarted claims handed back, running tasks get up to ShutdownDrainSeconds (25) - the scheduler fires nothing once shutdown starts - the startup retention sweep no longer holds up claiming and timers
…s before claiming - stale runs are deleted at startup before the pump claims and at every sweep, without running post-execution - RetentionHours defaults to 24
- each due slot is claimed with an ETag-guarded row, so the old and new container of a restart never both fire it - the scheduler keeps firing during shutdown; what it starts lands in storage for the successor
…grace - grace from ShutdownGraceSeconds, else WEBSITES_CONTAINER_STOP_TIME_LIMIT, else 30; the host shutdown timeout follows it - the drain defaults to the grace less a margin for Kestrel and also waits for scheduled starters
- the periodic sweep skips a run while any task holds a live lease; the startup pass still abandons regardless
…already gone - a delete transaction fails whole on one missing row; drop the row the service names and resend the rest - DeletePartitionAsync shares that path instead of skipping the whole batch
…ends - released once no claimed task is in flight, not after Kestrel stops; a waiting successor looks every 2s
…ounded - Work partitions without a run header, and Results partitions and name rows of runs that have none, are deleted once older than an hour - runs on the active list are left to index repair
JohnDuprey
approved these changes
Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes container restarts and overlapping deployments safe for background work, stops orchestrator storage from growing without limit, and fixes several worker problems.
Shutdown and restarts
ShutdownGraceSeconds, thenWEBSITES_CONTAINER_STOP_TIME_LIMIT, then 30 s. The host shutdown timeout uses the same value. The drain (ShutdownDrainSeconds) defaults to the grace minus a margin for Kestrel, so 120 → 110 and 30 → 25. It also waits for scheduled starters.StateTable,TimerSlotpartition). When the old and new containers overlap during a restart, only one of them fires a slot. The scheduler keeps firing during shutdown, and anything it starts is saved to storage for the successor.Orchestration
RetentionHoursafter they started are abandoned. They are deleted with no post-execution, at startup before the pump claims anything and again at every sweep. The periodic sweep skips a run while any of its tasks holds a live lease. The startup pass abandons it regardless.Storage
DeletePartitionAsyncnow uses the same path instead of skipping the whole batch.Workers
Behaviour changes
RetentionHoursdefault goes from 48 → 24. It now also sets how long a run may stay unfinished before it is abandoned. Instances that set it explicitly keep their value.ShutdownGraceSecondsandShutdownDrainSeconds. Both are documented indocs/configuration.mdandappsettings.example.jsonc.Tests
New or extended:
AzureTableStoreDeleteTests,OrchestrationLifecycleTests,WorkStoreTests,PowerShellWorkerRunspaceHygieneTestsandSchedulerTimezoneJitterE2ETests.