Provide a generic way of checking whether a database is the active writer

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

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Start by locating the WaitUntilReplicaIsCaughtUpToMaster struct and the code that checks the @@read_only variable before cutover. Trace how that check is used, then define completion as allowing callers to provide a query for determining whether the connected database is the active writer, while preserving the existing behavior when no query is configured.

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

Descrizione

Currently, we rely on the @@read_only variable to check whether our connection to the database is indeed to an active writer or if it's actually a read replica. This is done specifically before we use the WaitUntilReplicaIsCaughtUpToMaster struct to enter the cutover phase.

Perhaps not everybody's failover strategy is compatible with this behaviour. We could provide a configuration option on the WaitUntilReplicaIsCaughtUpToMaster struct so that the user can provide us with a query that checks this condition.

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.