graphprotocol / graphprotocol/graph-node
Priority of toml config vs env vars for connection pool size
Chưa có ai nhận issue này.
- 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?
Neither
What is the current behavior?
It seems that setting the size of a connection pool with the config file takes precedence over using STORE_CONNECTION_POOL_SIZE.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Start a graph node which uses
[store]
[store.primary]
connection = "<%= pgString %>"
pool_size = [
{ node = ".*", size = 30 },
]
and start the node with STORE_CONNECTION_POOL_SIZE=50. Then check the pool size using graphman and see that the config takes precedence.
What is the expected behavior?
I would expect the env var to take precedence over the config. Though I understand the env var isn't as fine grained.
Maybe I'm misunderstanding what STORE_CONNECTION_POOL_SIZE is meant for relative to pool_size in [store]?
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện cấu hình bằng cách sử dụng thiết lập TOML pool_size trong [store.primary] và STORE_CONNECTION_POOL_SIZE=50, sau đó kiểm tra kích thước pool thu được bằng graphman. Xác định thứ tự ưu tiên dự kiến giữa thiết lập pool_size chi tiết và biến môi trường, đồng thời xác minh hành vi đã chọn bằng một bài kiểm thử tập trung hoặc kết quả được ghi chép.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- rust
- Lĩnh vực
- backend, databases
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100