BinlogStreamer could block forever due to unconfigurable caughtupThreshold

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

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
go
Ambito
backend, databases

Direzione di ricerca

Start with ferry.go lines 254-258 and trace the caughtupThreshold loop and IsAlmostCaughtUp behavior. Review the discussion about a configurable deadline, aborting the move, and ControlServer-triggered cutover; done means an agreed behavior is implemented without forcing a disruptive cutover by default.

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

Descrizione

Originally by @hkdsun:

See https://github.com/Shopify/ghostferry/blob/be4f15d/ferry.go#L254-L258

In the situation where the source database is under very heavy load, such that ghostferry is always caughtupThreshold behind on writing data to the target, we could stay in that loop for a potentially really long time.

An idea is to have the function accept a configurable deadline. Once the deadline is reached, either abort the run or force the application to stop writes on the source (i.e. forcefully initiate the cutover phase).

Comment by @shuhaowu:

I would like to add, we could also add an API to dynamically force a cutover to occur (i.e. make IsAlmostCaughtUp return true always), perhaps triggerable via the ControlServer.

Comment by @fw42:

I think I'd prefer to abort the move rather than to force the cutover, at least as the default behaviour. If the source database has so many writes that we can't catch up, that probably means that it's very active right now. Locking the source database would be very disruptive at that moment.

Lingua principale
Go
Stelle
858
Fork
77
Merge medio
10g 4h
PR unite (30g)
4

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

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 Shopify/ghostferry

Tutte le issue di Shopify/ghostferry

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.