feat!: supports multi endpoints#46
Merged
killme2008 merged 2 commits intomainfrom Apr 21, 2026
Merged
Conversation
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
There was a problem hiding this comment.
Pull request overview
Adds multi-endpoint support to the GreptimeDB .NET ingester client, enabling client-side round-robin load balancing and failover across multiple GreptimeDB endpoints (closes #45).
Changes:
- Introduce
GreptimeClientOptions.Endpoints(multi-endpoint) and deprecate the singleEndpointproperty with fallback behavior. - Build gRPC channels using
Grpc.Net.Client.Balancerwith a static resolver + round-robin config when multiple endpoints are provided. - Drop
net6.0/net7.0TFMs, update docs/examples, and add unit tests for option validation/resolution.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/GreptimeDB.Ingester.Tests/GreptimeClientOptionsTests.cs | Adds unit coverage for endpoint list resolution and validation rules. |
| tests/GreptimeDB.Ingester.IntegrationTests/StreamIngestWriterIntegrationTests.cs | Updates integration setup to use Endpoints instead of deprecated Endpoint. |
| tests/GreptimeDB.Ingester.IntegrationTests/GreptimeClientTests.cs | Updates integration setup to use Endpoints. |
| tests/GreptimeDB.Ingester.IntegrationTests/BulkWriterIntegrationTests.cs | Updates integration setup to use Endpoints. |
| src/GreptimeDB.Ingester/GreptimeDB.Ingester.csproj | Adds DI package needed to construct a ServiceCollection for resolver services. |
| src/GreptimeDB.Ingester/Client/StreamIngestWriter.cs | Simplifies disposed checks now that minimum TFM is newer. |
| src/GreptimeDB.Ingester/Client/StaticResolverFactory.cs | Adds static resolver factory to feed fixed addresses to the gRPC balancer. |
| src/GreptimeDB.Ingester/Client/GreptimeClientOptions.cs | Adds Endpoints, deprecates Endpoint, and implements resolution/validation logic. |
| src/GreptimeDB.Ingester/Client/GreptimeClient.cs | Creates balanced gRPC channels for multiple endpoints and disposes associated service provider. |
| src/GreptimeDB.Ingester/Client/BulkWriter.cs | Simplifies disposed checks (min TFM update). |
| src/GreptimeDB.Ingester/Arrow/RecordBatchBuilder.cs | Simplifies disposed checks (min TFM update). |
| examples/quick-test.cs | Updates sample to use Endpoints. |
| examples/benchmark.cs | Updates sample to use Endpoints. |
| README.md | Updates documentation snippets to use Endpoints and DI examples accordingly. |
| Directory.Packages.props | Adds centralized package version for Microsoft.Extensions.DependencyInjection. |
| Directory.Build.props | Drops net6.0/net7.0 target frameworks. |
| CHANGELOG.md | Adds changelog documenting multi-endpoint support + breaking TFM change + deprecation. |
| .github/workflows/ci.yml | Removes net6/net7 compatibility job and updates integration-test job dependency chain. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
As the title said.
Close #45
Breaking changes: