Skip to content

feat: enable gRPC keepalive by default - #106

Merged
v0y4g3r merged 3 commits into
mainfrom
feat/default-enable-rpc-keepalive
Jul 20, 2026
Merged

feat: enable gRPC keepalive by default#106
v0y4g3r merged 3 commits into
mainfrom
feat/default-enable-rpc-keepalive

Conversation

@v0y4g3r

@v0y4g3r v0y4g3r commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • enable a 60-second gRPC keepalive default
  • apply channel-related RpcOptions to both Regular API and BulkStreamWriter
  • preserve legacy Bulk APIs and harden channel/allocator cleanup on construction failures
  • update configuration docs and add regression coverage

Test Plan

  • mvn -pl ingester-rpc,ingester-bulk-protocol,ingester-protocol -am test -DskipITs
  • mvn spotless:check
  • git diff --check origin/main...HEAD

Copilot AI review requested due to automatic review settings July 17, 2026 14:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 RpcOptions defaults 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.

Comment thread docs/GreptimeOptions-Configuration-Guide.md Outdated

@fengjiachun fengjiachun 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.

LGTM

@v0y4g3r
v0y4g3r merged commit b9a1528 into main Jul 20, 2026
6 checks passed
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.

3 participants