graphprotocol / graphprotocol/graph-node

DISABLE_BLOCK_INGESTOR does not disable block ingestion

Đang mở
#3,901 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

configuration
Ngôn ngữ chính
Rust
Star
3.2k
Fork
1.1k
Merge trung bình
4 ngày 1 giờ
Pull request đã merge (30 ngày)
1

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách kiểm tra docs/environment-variables.md và script khởi động Docker để xem DISABLE_BLOCK_INGESTOR và node_role được ghi lại và truyền qua như thế nào. Truy vết luồng khởi động chọn giữa chế độ chỉ truy vấn và chế độ lập chỉ mục, sau đó xác minh hành vi mong đợi bằng cách chạy image v0.27.0 với DISABLE_BLOCK_INGESTOR=true và xác nhận rằng quá trình nạp block và lập chỉ mục không khởi động.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
docker, rust
Lĩnh vực
backend, devops
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
42/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.