feat: enable gRPC keepalive by default - #106
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Enables gRPC keepalive by default (60s) and propagates channel-related RpcOptions into the Bulk API path (Flight/Arrow), while keeping legacy Bulk APIs working and improving resource cleanup on construction failures. This aligns the Regular and Bulk client stacks so they share consistent transport/channel behavior.
Changes:
- Change
RpcOptionsdefaults to enable keepalive (60s time, 3s timeout, without-calls=false) and add regression coverage. - Extend Bulk API options wiring to accept/copy
RpcOptions(channel + TLS resolution), and apply them when building Flight channels. - Harden allocator/channel lifecycle handling on failures; update docs and add tests around new behavior and legacy compatibility.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| ingester-rpc/src/test/java/io/greptime/rpc/RpcOptionsTest.java | Adds regression test for new keepalive defaults. |
| ingester-rpc/src/main/java/io/greptime/rpc/RpcOptions.java | Enables keepalive by default and updates option section comments. |
| ingester-protocol/src/test/java/io/greptime/options/GreptimeOptionsTest.java | Extends tests to verify Bulk API receives copied channel-related RpcOptions. |
| ingester-protocol/src/main/java/io/greptime/options/GreptimeOptions.java | Documents option scope and copies RpcOptions into BulkWriteOptions. |
| ingester-protocol/src/main/java/io/greptime/options/BulkWriteOptions.java | Adds RpcOptions field with copy semantics in copy() and string output. |
| ingester-protocol/src/main/java/io/greptime/BulkWriteClient.java | Resolves RpcOptions (incl. legacy TLS override) and uses new Bulk manager creation path. |
| ingester-bulk-protocol/src/test/java/org/apache/arrow/flight/NettyChannelBuilderInspector.java | Adds reflection-based inspector to assert applied Netty channel settings in tests. |
| ingester-bulk-protocol/src/test/java/org/apache/arrow/flight/BulkFlightClientTest.java | Adds coverage for channel configuration, TLS precedence, and failure cleanup. |
| ingester-bulk-protocol/src/test/java/io/greptime/BulkWriteManagerTest.java | Adds coverage ensuring allocator cleanup on manager creation failure. |
| ingester-bulk-protocol/src/test/java/io/greptime/BulkWriteManagerCompatibilityTest.java | Adds compile-time test for legacy create(...) overload compatibility. |
| ingester-bulk-protocol/src/main/java/org/apache/arrow/flight/BulkFlightClient.java | Introduces RpcOptions-driven channel configuration and improves constructor/close cleanup paths. |
| ingester-bulk-protocol/src/main/java/io/greptime/BulkWriteManager.java | Adds createWithRpcOptions(...) and improves allocator/Flight client cleanup on failure. |
| docs/metrics-display.md | Updates example output to reflect new keepalive defaults. |
| docs/GreptimeOptions-配置指南.md | Updates RPC/TLS scope docs and example to reflect Bulk API applicability + keepalive default. |
| docs/GreptimeOptions-Configuration-Guide.md | Updates RPC/TLS scope docs and example to reflect Bulk API applicability + keepalive default. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fengjiachun
reviewed
Jul 20, 2026
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.
Summary
Test Plan
mvn -pl ingester-rpc,ingester-bulk-protocol,ingester-protocol -am test -DskipITsmvn spotless:checkgit diff --check origin/main...HEAD