-
Notifications
You must be signed in to change notification settings - Fork 614
[client-v2] fixed NPE and added test #2356
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
| initTable(tableName, createSQL); | ||
|
|
||
| InsertSettings localSettings = new InsertSettings(settings.getAllSettings()); | ||
| localSettings.setOption(ClientConfigProperties.ASYNC_OPERATIONS.getKey(), true); |
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.
Can we also have a test with async disabled
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.
Done
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 fixes a Null Pointer Exception by ensuring that a default JVM pool is used when no executor is provided, and it adds integration tests for async insert operations.
- Adds a new async insert test verifying the async operation behavior.
- Modifies the async operation method in the client to handle cases where the shared executor is null.
- Comments out legacy logging configuration.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| client-v2/src/test/java/com/clickhouse/client/insert/InsertTests.java | Introduces a new async data insertion test and updates logging code. |
| client-v2/src/main/java/com/clickhouse/client/api/Client.java | Refines asynchronous operation handling by checking for a null executor. |
|




Summary
Fixes #2355 by using default JVM pool in case executor is no specified by client nor client is configured for async operations
Checklist
Delete items not relevant to your PR: