Repository navigation
Conversation
PR #105724 — preserve heartbeated external fire claims in cron sweepCorrect race fix: before the age-based sweep reaps a stale in-flight entry, it checks the durable fire claim (
|
bzarzoza
force-pushed
the
fix/cron-live-fire-claim-sweep
branch
from
September 8, 2026 15:52
111ab2e to
7f59420
Compare
This branch has not been deployed
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.
Problem
A restart-safe external cron worker can legitimately run longer than the local in-flight guard allowance. The local process has no live
Futurefor that worker, sosweep_stale_inflight()can force-release the job after 30 minutes even while the worker is heartbeating its durablefire_claim. The subsequent completion clears the claim and the still-running worker discards its result as stale.This was reproduced on two external cron jobs; each ran for about 30m46s and ended with
Fire claim ownership lost; stale result was discarded.Fix
Tests
scripts/run_tests.sh tests/cron/test_recurring_wedge_selfheal.py -k 'live_durable_fire_claim_outlives_local_future or stale_claim_self_heals_and_redispatches or guard_stats_reported'3 passed.