1 in process zone transfer phase journal
forgejo-actions edited this page 2026-07-15 12:43:13 +00:00

In-Process Zone Transfer Phase Journal

The in-process zone transfer phase journal makes same-server zone transfers durable, idempotent, retryable, and inspectable by phase.

How It Works

Transfer state advances through requested, runtime hydrated, session relocated, location persisted, presence published, and completed phases. Phase compare-and-swap protects idempotency and source identity. Retry and dead-letter behavior preserve the phase that failed.

How To Use It

Advance transfers through the journal rather than mutating all state at once. Use the phase to decide whether actor state, directory indexes, Postgres location, or Redis presence still need work.

Invariants

Source identity must match. A stale transfer record must not relocate a new session. Session directory index changes, location persistence, and presence publishing each belong to their own phase.

Debugging

Changed source identity, stale records, persistence failure, and presence failure should be diagnosed by phase. Requeue should continue from the current phase when safe; dead-letter should summarize the failing phase and error.

Examples

If location persistence fails after session relocation, retry should not move the actor again. It should resume at location persistence, then publish presence, then complete.