Skip to content

Make DI example clearer wrt connection and httpclient lifetime handling#195

Merged
alex-clickhouse merged 3 commits intomainfrom
examples-adjustment
Jan 28, 2026
Merged

Make DI example clearer wrt connection and httpclient lifetime handling#195
alex-clickhouse merged 3 commits intomainfrom
examples-adjustment

Conversation

@alex-clickhouse
Copy link
Copy Markdown
Collaborator

@alex-clickhouse alex-clickhouse commented Jan 27, 2026

Note

Enhances the DI example to correctly demonstrate client/connection lifetimes and shared HttpClient/handler usage.

  • Adds prominent guidance on connection pooling/socket exhaustion and recommends singleton HttpClient, singleton ClickHouseConnection, or using singleton ClickHouseDataSource
  • Simplifies IHttpClientFactory integration by registering AddClickHouseDataSource via a settings factory, ensuring a shared SocketsHttpHandler
  • Improves comments/logging in examples and updates examples/README.md description to note proper lifetime handling

Written by Cursor Bugbot for commit e485ec3. This will update automatically on new commits. Configure here.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@alex-clickhouse alex-clickhouse merged commit 7729f80 into main Jan 28, 2026
18 checks passed
@alex-clickhouse alex-clickhouse deleted the examples-adjustment branch January 28, 2026 10:04
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