CCIP-11474 configure Aggregator/Indexer PG connection#1129
Open
bukata-sa wants to merge 5 commits into
Open
Conversation
af63bd6 to
ec35abf
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support in the indexer for configuring PostgreSQL connection pool recycling via ConnMaxLifetime and ConnMaxIdleTime, wiring these settings through config validation and into storage initialization paths (including replay).
Changes:
- Extend indexer Postgres config with connection max lifetime and max idle time settings (with validation/defaulting).
- Thread the new settings into
NewPostgresStorageandreplay.NewStoreFromConfigso pools apply the recycling policy. - Update affected call sites and constructor-signature tests.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| indexer/pkg/storage/postgres.go | Extends storage constructor to apply SetConnMaxLifetime / SetConnMaxIdleTime on the DB pool. |
| indexer/pkg/storage/postgres_test.go | Updates constructor calls to include the new duration parameters. |
| indexer/pkg/replay/store.go | Extends replay store constructor to apply pool lifetime/idle settings. |
| indexer/pkg/config/config.go | Adds new Postgres config fields and validation/defaulting logic. |
| indexer/cmd/replay/main.go | Wires new config values into replay store and indexer storage creation. |
| indexer/cmd/main.go | Wires new config values into indexer storage creation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
52d712a to
09abf91
Compare
b320345 to
78d1fcb
Compare
78d1fcb to
7d1b8b3
Compare
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Code coverage report:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://smartcontract-it.atlassian.net/browse/CCIP-11474
Description
Adds configurable PostgreSQL connection pool lifetime and idle timeout settings for the indexer. This wires the new settings through config and storage initialization so DB connections can be recycled more safely and predictably. Also updates related tests to match the new constructor signatures.
Testing
Didn't test with devenv, this is just a config update with sane defaults
Checklist
changelogdirectory)just lint fix- no new lint errorsjust generate- mocks and protobufs are up to date