graphprotocol / graphprotocol/graph-node
DISABLE_BLOCK_INGESTOR does not disable block ingestion
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Rust
- Sterne
- 3.2k
- Forks
- 1.1k
- Ø Merge
- 4 T. 1 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
If the DISABLE_BLOCK_INGESTOR is set to true, 'true', or "true" the subgraph writer / block ingestion is still started when running graph-node
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Reproduction steps:
Using the v.0.27.0 build or image from docker hubgraphprotocol:graph-node:v0.27.0
- Set
DISABLE_BLOCK_INGESTOR=trueand start the graph node - Check the logs and see that the block ingestion and indexing still occurs.
What is the expected behavior?
The expected behavior is that the graph node starts in 'query' only mode with block ingestion and indexing disabled.
Further Digging
I've found that the correct way to disable block ingestion is to set the env var node_id to something other than 'default'. If node_id is not provided, the node name is set to default and the graph-node assumes it needs to ingest and index. This can be verified by setting node_id=default.
Setting node_id to anything else start the graph-node with block ingestion and indexing disabled. Looking at the docker start script, you can also pass node_role=query-node which is sugar for setting DISABLE_BLOCK_INGESTOR=true. This has no effect either and leaving node_role unset has no effect on whether the node starts in query or indexing mode.
Proposed Fixes
Either update the env var readme and remove DISABLE_BLOCK_INGESTOR and describe the node_id behavior.
Respect DISABLE_BLOCK_INGESTOR flag.
I'm happy to open a PR to update the README if this should be the fix.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, docs/environment-variables.md und das Docker-Startskript daraufhin zu prüfen, wie DISABLE_BLOCK_INGESTOR und node_role dokumentiert und weitergereicht werden. Verfolge den Startpfad, der zwischen dem Nur-Abfrage- und dem Indizierungsmodus auswählt, und überprüfe anschließend das erwartete Verhalten, indem du das v0.27.0-Image mit DISABLE_BLOCK_INGESTOR=true ausführst und bestätigst, dass die Blockaufnahme und die Indizierung nicht starten.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- docker, rust
- Bereich
- backend, devops
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100