graphprotocol / graphprotocol/graph-node
Priority of toml config vs env vars for connection pool size
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Rust
- Sterne
- 3.2k
- Forks
- 1.1k
- Ø Merge
- 4 T. 1 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
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]?
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere die Konfiguration mit der TOML-Einstellung pool_size in [store.primary] und STORE_CONNECTION_POOL_SIZE=50 und überprüfe anschließend die resultierende Poolgröße mit graphman. Ermittle die beabsichtigte Priorität zwischen der feingranularen Einstellung pool_size und der Umgebungsvariable und verifiziere das gewählte Verhalten mit einem gezielten Test oder einem dokumentierten Ergebnis.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- rust
- Bereich
- backend, databases
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100