graphprotocol / graphprotocol/graph-node

DISABLE_BLOCK_INGESTOR does not disable block ingestion

オープン
#3,901 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

configuration
主要言語
Rust
スター
3.2k
フォーク
1.1k
平均マージ
4日 1時間
マージ済み PR(30日)
1

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず docs/environment-variables.md と Docker の起動スクリプトを確認し、DISABLE_BLOCK_INGESTOR と node_role がどのように文書化され、引き渡されているかを調べます。クエリ専用モードとインデックス作成モードのどちらを選択する起動経路を追跡し、その後、DISABLE_BLOCK_INGESTOR=true を指定して v0.27.0 イメージを実行し、ブロックの取り込みとインデックス作成が開始されないことを確認して、想定される動作を検証します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
docker, rust
領域
backend, devops
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。