Repository navigation
Conversation
Migration v065 adds awa.runtime_attempts, one row per runtime instance listing the long-running attempts it holds, and a nullable runtime_instances.attempts_unpublished_since. admin::attempt_instances and admin::runtime_attempts read them, RuntimeInstance gains attempts_unpublished_since, and the maintenance leader deletes a dead instance's list with its snapshot. Every read treats a schema before v065 as not reported. Runtimes do not publish yet.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 28 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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: 933c5decf0
ℹ️ 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".
attempt_instances read the active schema from the runtime_storage_backends marker, so a database whose marker row was lost matched no published list. It now asks awa.active_queue_storage_schema(), which falls back to the transition state as v020 made it.
Summary
First of four PRs for ADR-055, tracked in #905: the schema and the admin reads. Runtimes do not publish yet; that is the next PR.
awa.runtime_attempts(one row per instance,fillfactor50, per-table autovacuum thresholds, no foreign key and no trigger) and a nullableawa.runtime_instances.attempts_unpublished_since.admin::attempt_instances(pool, &[(job_id, run_lease)])returns the instance that lists each attempt for the active storage schema. A newer attempt of the same job, or another schema's job id, never matches.admin::runtime_attempts(pool, instance_id)reads one instance's list.RuntimeInstancegainsattempts_unpublished_since.list_runtime_instancesreads it throughto_jsonb(row), so an admin binary on a schema before v065 reads null instead of failing.admin::cleanup_runtime_attemptsdeletes lists whose instance has no snapshot and that are older than the snapshot retention. The maintenance leader runs it after snapshot cleanup.Rolling upgrade
ACCESS EXCLUSIVEonruntime_instancesfor a catalog change only.Migration number
Open PRs #884 and #887 also add migrations numbered v064 and v065. Whichever merges second renumbers.
Testing
awa-model/tests/runtime_attempts_test.rs:migrationsunit tests (DDL guards, transaction safety) pass.migration_testwas run locally in parallel and timed out on shared-database contention; one of the slow tests passes alone. CI runs that binary serially.Generated by Claude Code