graphprotocol / graphprotocol/graph-node

DISABLE_BLOCK_INGESTOR does not disable block ingestion

Ouverte
#3,901 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

configuration
Langage dominant
Rust
Étoiles
3.2k
Forks
1.1k
Merge moyen
4 j 1 h
PR mergées (30 j)
1

Description

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=true and 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.

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par vérifier docs/environment-variables.md et le script de démarrage Docker pour voir comment DISABLE_BLOCK_INGESTOR et node_role sont documentés et transmis. Suivez le chemin de démarrage qui sélectionne le mode requête seule ou le mode indexation, puis vérifiez le comportement attendu en exécutant l’image v0.27.0 avec DISABLE_BLOCK_INGESTOR=true et en confirmant que l’ingestion des blocs et l’indexation ne démarrent pas.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
docker, rust
Domaine
backend, devops
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
42/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.