-
Notifications
You must be signed in to change notification settings - Fork 50
fix(decopilot): cross-pod recovery actually fires on pod death #3393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
viktormarinho
wants to merge
15
commits into
main
Choose a base branch
from
viktormarinho/pod-death-recovery
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 8 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
733331a
fix(decopilot): cross-pod recovery actually fires on pod death
viktormarinho b27293e
fix(decopilot): keep purge on resume, guard with duplicate-detection …
viktormarinho 3b61478
fix(heartbeat): re-arm death detection on NATS reconnect
viktormarinho 0c01905
Merge remote-tracking branch 'origin/main' into viktormarinho/pod-dea…
viktormarinho f8bc4dd
test(multi-pod): clear DBOS workflow state between scenarios
viktormarinho f2ab135
refactor(heartbeat): swap NATS KV for Postgres advisory locks
viktormarinho fa4898a
test(pod-death): gate late watcher on chunk-10 to avoid kill-window race
viktormarinho 5c800ed
fix(heartbeat): xact-scoped probe lock, ordered start, rename to stud…
viktormarinho 05db218
fix(heartbeat): respect DB SSL config + hold xact lock through peer D…
viktormarinho 38641d4
fix(claimOrphanedRun): real CAS on previous owner
viktormarinho 0b8ec39
fix(recovery): scope startup orphan sweep to dead-owner threads
viktormarinho f4bfb1f
fix(heartbeat): route graceful shutdown through the same death signal
viktormarinho 7d6af94
refactor: delete heartbeat + ownership, trust DBOS for recovery
viktormarinho 9343540
fix(claimRunStart): drop pod-bound CAS so DBOS replay can claim
viktormarinho c6099d5
feat(settings): refuse to boot in production without POD_NAME
viktormarinho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| /** | ||
| * `studio_pods` — registry of currently-live pod ids. | ||
| * | ||
| * Each mesh pod inserts its row on boot (`INSERT ... ON CONFLICT DO | ||
| * NOTHING`) and deletes on graceful stop. The Postgres-advisory-lock | ||
| * heartbeat at `apps/mesh/src/core/pod-heartbeat.ts` (PgPodHeartbeat) | ||
| * uses this table to enumerate peer pods to probe — surveying every | ||
| * row and trying `pg_try_advisory_xact_lock(hashtext(pod_id))` to | ||
| * detect the ones whose owner is gone. | ||
| * | ||
| * Single-column on purpose: peer-death recovery cares about the set | ||
| * of pod ids and nothing else. Any timestamps would just rot since | ||
| * the advisory lock IS the liveness signal. | ||
| */ | ||
| import type { Kysely } from "kysely"; | ||
|
|
||
| export async function up(db: Kysely<unknown>): Promise<void> { | ||
| await db.schema | ||
| .createTable("studio_pods") | ||
| .addColumn("pod_id", "text", (col) => col.primaryKey()) | ||
| .execute(); | ||
| } | ||
|
|
||
| export async function down(db: Kysely<unknown>): Promise<void> { | ||
| await db.schema.dropTable("studio_pods").execute(); | ||
| } |
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.