[apscheduler] store one cache record per declared job - #290
Open
ricardo-agz wants to merge 1 commit into
Open
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ricardo-agz
force-pushed
the
ricardo/aps-per-job-records
branch
from
August 12, 2026 02:06
c255deb to
6df1f4f
Compare
ricardo-agz
force-pushed
the
ricardo/aps-per-job-records
branch
from
August 12, 2026 02:17
6df1f4f to
7f1b955
Compare
ricardo-agz
force-pushed
the
ricardo/aps-per-job-records
branch
from
August 12, 2026 02:22
7f1b955 to
345c7a8
Compare
ricardo-agz
force-pushed
the
ricardo/aps-per-job-records
branch
from
August 13, 2026 21:58
345c7a8 to
60e47bb
Compare
The single jobs document coupled every job's fate: one lost read-merge-write race could clobber unrelated progress, eviction was all-or-nothing, and the cache's per-item size limit bounded the population. Declared-only made the document unnecessary: code is the index, so each declared job now has its own record and reads enumerate the declared ids. Reconciliation becomes read-repair. A record that is missing, unreadable, or fingerprinted for a different declared schedule is rebuilt from its declaration at the point of use, owner-fenced, with a log line that makes eviction observable. The takeover sweep, its convergence marker, and the quarantine machinery all delete; takeover syncs lazily because every read validates against code.
ricardo-agz
force-pushed
the
ricardo/aps-per-job-records
branch
from
August 13, 2026 22:33
60e47bb to
ce6b7fc
Compare
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.
Replaces the single jobs document in Runtime Cache with one record per declared job.
Rationale:
Since jobs are static, the code is the source of truth for the jobs, meaning that the job ids are known at import time so an index store is no longer needed.
Reconciliation becomes read-repair: a record that is missing, unreadable, or fingerprinted for a different declared schedule is rebuilt from its declaration at the point of use, owner-fenced, with a log line that makes cache eviction observable in production. A demoted deployment's reads degrade to a declaration-derived view without writing.
What this buys
Deleted machinery
The takeover reconciliation sweep, its convergence retries, the
reconciled_deploymentmarker (and its document fate-sharing trick), and the quarantine path all go away — every read validates against code, so there is nothing left to sweep, stamp, or quarantine.Old single-document keys are simply never read again and age out by TTL; state rebuilds from code, so there is no migration.