graphprotocol / graphprotocol/graph-node
Make queries deterministic when using read replicas
Nessuno ha ancora preso questa issue.
- Lingua principale
- Rust
- Stelle
- 3.2k
- Fork
- 1.1k
- Merge medio
- 4g 1h
- PR unite (30g)
- 1
Descrizione
When graph-node uses a shard that has asynchronous read replicas, query results are not deterministic because the read replicas can trail behind the main database, usually up to 30s.
When we execute a GraphQL query, we determine the block at which to execute by looking at the main database; fetching the data for the query result might be done against one of the read replicas which can lag behind the main database, and so even though we claim that the query was executed against block 100, the data that we use for the result might only be up to block 99.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia tracciando l’esecuzione delle query GraphQL dalla selezione del blocco sul database principale fino al recupero dai shard e dalle read-replica. Riproduci il caso in cui una read-replica è indietro di uno o più blocchi rispetto al blocco selezionato, quindi definisci e testa un comportamento che mantenga coerenti il blocco riportato e i dati restituiti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- graphql, rust
- Ambito
- backend-api-design, databases, distributed-systems
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100