Repository navigation
Add scheduled and targeted refresh for BReg external projections - #2650
Merged
Merged
Conversation
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 36d2301e19
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Jeremi Joslin <jeremi@joslin.fr>
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.
Summary
Add deployment-owned
externalRefreshplans for indexed BReg links. Operators can reuse a scoped service worker, schedule reconciliation withbregctl external-projection refresh, and admit signed source-change hints through a separate notifier. Local Record changes enqueue work in the same transaction. PostgreSQL owns the lease, checkpoint, retries, and replay state.Targeted work resolves current authorised links before contacting the source. The existing projection grant, per-key publication fence, and expiry rules still govern the retained results. Generated runtime schema, OpenAPI and CLI reference describe the configuration and driver.
Evidence
cargo test --locked -p registry-breg --features postgres-test,tooling,schema --lib external_: 94 passed on the integrated branch against real PostgreSQL, including scoped acquisition, retry and expiry, queue fencing, label membership, and schedule edits.run_candidate.py --scale --managed-refresh: the paired scale candidate covered 1,000,000 eligible and 100,000 excluded roots. Cold indexed readiness took 491 seconds, followed by repeats at 401 and 406 seconds. A source hint fetched one selector and updated all 20 linked roots. The final branch separately verified the subsequent schedule registration changes and latest-main integration.pg_dump/pg_restorepreserved ordinary Records and restored all seven excluded cache and queue tables empty. The 100,000-receipt SQL probe refused new admission while allowing exact replay and settlement.Hosted CI will run on this PR.
Notes
Existing indexed deployments need a successor activation to install the queue and managed lookup indexes. After the queue is provisioned, removing the final indexed projection declaration requires a separate retirement migration. Removing the source binding and plans stops acquisition without discarding queue state during activation.
DCO
Signed-off-bytrailer.