graphprotocol / graphprotocol/graph-node

DISABLE_BLOCK_INGESTOR does not disable block ingestion

Abierto
#3,901 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

configuration
Lenguaje dominante
Rust
Estrellas
3.2k
Forks
1.1k
Merge medio
4 d 1 h
PR fusionados (30 d)
1

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Empieza revisando docs/environment-variables.md y el script de inicio de Docker para comprobar cómo se documentan y se transmiten DISABLE_BLOCK_INGESTOR y node_role. Traza la ruta de inicio que selecciona entre el modo de solo consulta y el modo de indexación; después, verifica el comportamiento esperado ejecutando la imagen v0.27.0 con DISABLE_BLOCK_INGESTOR=true y confirmando que la ingesta de bloques y la indexación no se inician.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
docker, rust
Área
backend, devops
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
42/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.