-
Notifications
You must be signed in to change notification settings - Fork 8
feat: allows users set some grpc options #232
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces support for configuring the maximum RPC inbound message size for the InfluxDB client while also updating the FlightSqlClient to use NettyChannelBuilder.forAddress for improved IP address support.
- Added unit tests to verify the behavior for different inbound message size settings
- Updated FlightSqlClient to extract URI and use appropriate NettyChannelBuilder methods
- Enhanced ClientConfig with maxInboundMessageSize property and updated related methods
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/test/java/com/influxdb/v3/client/config/ClientConfigTest.java | Added tests for handling maxInboundMessageSize and minor adjustments in test helpers |
| src/main/java/com/influxdb/v3/client/internal/FlightSqlClient.java | Modified channel creation to use forAddress and added support for configurable message size |
| src/main/java/com/influxdb/v3/client/config/ClientConfig.java | Introduced a new property for maxInboundMessageSize and updated builder, equals, hashCode, and toString |
src/test/java/com/influxdb/v3/client/config/ClientConfigTest.java
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #232 +/- ##
==========================================
+ Coverage 90.05% 90.14% +0.08%
==========================================
Files 18 19 +1
Lines 1036 1126 +90
Branches 164 177 +13
==========================================
+ Hits 933 1015 +82
- Misses 40 41 +1
- Partials 63 70 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @karel-rehor @jansimonb |
|
Does this PR have a linked issue? What is the reason for limiting the message size? Is it ok that the metadata/header size left unlimited? |
This is the issue link |
|
The linked issue also mentions setting the max sent message size. Don't you want to add that too? |
I talked with Karel and it looks like we need to support all transport options not just the message size limit |
src/main/java/com/influxdb/v3/client/internal/GrpcCallOption.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/GrpcCallOption.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/GrpcCallOption.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/FlightSqlClient.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
jansimonb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just minor comments. Please add test for equals/hashcode/tostring to fix the decreased coverage.
src/main/java/com/influxdb/v3/client/internal/GrpcCallOptions.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/InfluxDBClientImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/com/influxdb/v3/client/internal/GrpcCallOptions.java
Outdated
Show resolved
Hide resolved
jansimonb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! 👍
a2c80a6 to
282d5c6
Compare
Issue Link
Proposed Changes
_ Users can set some of the rpc calls options from io.grpcCallOptions (not all, just some).
_ I have to change NettyChannelBuilder.forTarget back to NettyChannelBuilder.forAddress because the latter works well with ip addresses (more flexible).
_ I set maxInboundMessageSize = Integer.MAX_VALUE when the maxInboundMessageSize = null just for backward compatibility reasons.
Checklist