graphprotocol / graphprotocol/graph-node
[Feature] Graceful shutdown
Nessuno ha ancora preso questa issue.
- Lingua principale
- Rust
- Stelle
- 3.2k
- Fork
- 1.1k
- Merge medio
- 4g 1h
- PR unite (30g)
- 1
Descrizione
Description
I'm using graph-node in kubernetes with a sql proxy to connect to postgresql.
When I do a replace of the graph-node, kubernetes sends a SIGTERM and will wait 30s before forcing a shutdown.
I'm waiting 30s in the SQL proxy to let the graph-node to finish its queries.
But the graph-node does not stop, It just sends errors because the database goes away and waits for kubernetes to force the kill of the pod.
A nice feature would be to permit a graceful shutdown of the graph-node.
It should stop indexing on SIGTERM, finish its sql queries and disconnect to the database.
More, it can prevent some unexpected issues in postgresql database like bad block caching.
An indexer node or query has actually the same behaviour.
Are you aware of any blockers that must be resolved before implementing this feature? If so, which? Link to any relevant GitHub issues.
No response
Some information to help us out
- Tick this box if you plan on implementing this feature yourself.
- I have searched the issue tracker to make sure this issue is not a duplicate.
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 il modo in cui graph-node gestisce SIGTERM e come vengono arrestati i suoi processi di indicizzazione e query. Verifica il comportamento di shutdown con Kubernetes e SQL proxy, quindi verifica che l’indicizzazione si arresti, che le query SQL in corso terminino e che la connessione PostgreSQL venga disconnessa prima della fine della finestra di terminazione di 30 secondi.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- kubernetes, postgresql, rust
- Ambito
- backend, databases, infrastructure
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100