awa migrate: replica_identity lock timeout under load (message accuracy, and retrying the lock)

Aperta
#774 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
postgresql, rust
Ambito
databases

Direzione di ricerca

Start with the replica_identity schema patch and the hint text emitted by awa migrate when SQLSTATE 55P03 occurs; main's v047_replica_identity is the reference for lock handling. Option 1 is a message-only change in the migration error path, so check the tests asserting that hint. Option 2 (retry with pause) is a design decision, so confirm the maintainers' choice before coding it. Done means the hint matches what was actually applied, or a bounded retry is in place with tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

operational

On 0.6, the replica_identity schema patch takes its lock with a 300ms lock_timeout. When a live worker holds a conflicting lock on awa.admin_dirty_queue_marks, awa migrate exits with 55P03 and the hint "Nothing was changed. Run awa migrate again, or raise lock_timeout for the migrating session."

The hint is inaccurate when other patches were pending: the runner commits each schema patch in its own transaction and replica_identity runs last, so the earlier patches are already applied. Re-running is safe (they report "already present"), but the message tells operators otherwise.

The patch upgrade rehearsal hit this under released 0.6.15 traffic on pg18; #770 makes the rehearsal re-run migrate on this error, the way the hint tells operators to.

Options:

  1. Reword the hint to say which patches were applied and that re-running is safe (0.6.18 candidate).
  2. Have awa migrate retry the lock itself a few times with a short pause before giving up, so operators upgrading under load rarely see it (0.7 candidate).

main's v047_replica_identity sets no lock_timeout and waits instead; v050 and v052 bound lock waits at 2s, and lock cycles surface as deadlocks, which the runner already retries.

Lingua principale
Rust
Stelle
37
Fork
8
Merge medio
14h 16m
PR unite (30g)
244

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di hardbyte/awa

Tutte le issue di hardbyte/awa

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.