Repository navigation
fix: bound jobstore copy connections per process - #25429
Merged
Merged
Conversation
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.
What changed and why
Concurrent cold privacy purges created a new two-session pool per invocation, multiplying connections outside the namespace cache. The environment-selected jobstore factory now shares two normal sessions and one reserved erasure session across namespaces and cached/cold calls in each process. Normal saturation cannot consume deletion capacity; failures still raise into durable retry, and retargeting requires a process restart.
This is a per-process bound. Fleet admission, operating budgets and production rollout remain separate; no workflow, deployment, IAM, migration or production setting changes are included.
Product invariants affected
none
How it was verified
make preflightat head68120ee8846fd9644faae90a02012c9cb94c194cpasses41 checks. No gate bypassed.Tests
backend/tests/unit/test_jobstore_copy_connections.pydrives the real pool and factory.backend/tests/integration/test_jobstore_purge_postgres.pynow exercises erasure through a separate reserved connection, including mode-off cold calls. Existing index/cohort and current-source retirement suites pass.UI evidence
UI-Evidence: none -- internal backend resource ownership only.
Failure class (fixes)
Failure-Class: new
Failure-class transition narrative
The violated contract is a shared resource ceiling multiplied by per-call pool construction. The new FC-per-call-pools-multiply-shared-capacity definition names the shared process-owned factory and concurrent counting-connector test as the canonical prevention. This patch provides the first source fix and guard; no previous merged PR is asserted as evidence.