Skip to content

feat: support resilient reader config for indexer and add retry policy - #1364

Draft
huangzhen1997 wants to merge 4 commits into
mainfrom
jh/resilient-reader-config
Draft

feat: support resilient reader config for indexer and add retry policy#1364
huangzhen1997 wants to merge 4 commits into
mainfrom
jh/resilient-reader-config

Conversation

@huangzhen1997

Copy link
Copy Markdown
Contributor

We encountered rate limiting issue value of the resilient reader, and it's never configurable, it always using this hardcoded default value.

Copilot AI lite review requested due to automatic review settings August 19, 2026 21:11
@huangzhen1997
huangzhen1997 requested a review from a team as a code owner August 19, 2026 21:11
@github-actions

Copy link
Copy Markdown

👋 huangzhen1997, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes the indexer’s resilient reader policies configurable via TOML, so rate limiting / bulkhead / circuit breaker / timeout parameters are no longer hardcoded and can be tuned to mitigate downstream rate limiting.

Changes:

  • Adds [Resilience] configuration to the indexer config model and example TOML.
  • Introduces a readers.NewResilienceConfig(config.ResilienceConfig) adapter that applies defaults for zero-valued config fields.
  • Threads the resilience configuration through reader construction (REST + Aggregator) and adds tests for the new adapter.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
indexer/pkg/readers/rest_reader.go Adds resilience config to RestReaderConfig and passes it into NewResilientReader.
indexer/pkg/readers/rest_reader_test.go Updates REST reader tests to provide a resilience config.
indexer/pkg/readers/resilient_reader.go Adds adapter to convert indexer config resilience settings into reader resilience config with defaults.
indexer/pkg/readers/resilient_reader_test.go Adds unit tests for NewResilienceConfig defaulting/overrides behavior.
indexer/pkg/readers/aggregator_reader.go Extends constructor signature to accept resilience config and wires aggregator-specific handlers.
indexer/pkg/config/config.go Adds Resilience and ResilienceConfig to the indexer configuration model.
indexer/config.example.toml Documents the new [Resilience] TOML block and its default values.
indexer/cmd/replay/main.go Passes configured resilience settings into reader creation in replay mode.
indexer/cmd/main.go Passes configured resilience settings into reader creation in normal indexer mode.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread indexer/pkg/readers/rest_reader.go
Comment thread indexer/pkg/config/config.go Outdated
Comment thread indexer/pkg/readers/aggregator_reader.go
@huangzhen1997 huangzhen1997 changed the title feat: support resilient reader config for indexer feat: support resilient reader config for indexer and add retry policy Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants