graphprotocol / graphprotocol/graph-node
DISABLE_BLOCK_INGESTOR does not disable block ingestion
还没有人认领这个 Issue。
- 主要语言
- Rust
- 星标
- 3.2k
- 派生
- 1.1k
- 平均合并
- 4 天 1 小时
- 30 天内合并 PR
- 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=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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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