Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clickhouse and poller settings #110

Merged
merged 1 commit into from
Oct 23, 2024
Merged

Conversation

iuwqyir
Copy link
Collaborator

@iuwqyir iuwqyir commented Oct 21, 2024

TL;DR

Added support for configuring parallel pollers and asynchronous inserts in ClickHouse storage.

What changed?

  • Added a new configuration option poller.parallelPollers to control the number of parallel pollers.
  • Introduced asyncInsert configuration for ClickHouse storage in main, staging, and orchestrator settings.
  • Updated the Poller to use the configured number of parallel pollers.
  • Modified ClickHouse connection setup to enable async inserts when configured.
  • Fixed error messages in InsertBlockData function to correctly reflect insert operations.

How to test?

  1. Update your configuration to include the new poller.parallelPollers setting.
  2. Set asyncInsert: true in the ClickHouse configuration for main, staging, or orchestrator storage.
  3. Run the application with these new settings and monitor performance.
  4. Check logs for debug messages showing executed queries.
  5. Verify that data is being inserted correctly with the new parallel polling and async insert features.

Why make this change?

This change aims to improve performance and scalability of the application by:

  1. Allowing multiple pollers to work in parallel, potentially increasing the rate of data collection.
  2. Enabling asynchronous inserts in ClickHouse, which can improve write performance for large datasets.

These optimizations should lead to faster data processing and reduced latency, especially when dealing with high volumes of blockchain data.

Copy link
Collaborator Author

iuwqyir commented Oct 21, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @iuwqyir and the rest of your teammates on Graphite Graphite

@iuwqyir iuwqyir force-pushed the 10-21-clickhouse_and_poller_settings branch from c34ab31 to f7f7e57 Compare October 21, 2024 18:50
@iuwqyir iuwqyir marked this pull request as ready for review October 21, 2024 18:50
Copy link
Contributor

what's the reason to have asyncInserts?

Copy link
Collaborator Author

iuwqyir commented Oct 21, 2024

To not overload Clickhouse with too many inserts

@iuwqyir iuwqyir force-pushed the 10-21-clickhouse_and_poller_settings branch from 1910261 to 06bb521 Compare October 23, 2024 20:33
@iuwqyir iuwqyir merged commit c9f44af into main Oct 23, 2024
5 of 6 checks passed
@iuwqyir iuwqyir deleted the 10-21-clickhouse_and_poller_settings branch October 23, 2024 20:35
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