|
2 | 2 |
|
3 | 3 | ### Breaking Changes |
4 | 4 |
|
5 | | -- **[jdbc-v2]** Hardcoded server setting `async_insert=0` is removed as well as others. This is done to |
6 | | - fix issue with overriding these settings and using client with read-only profiles. The change, first of all, makes |
7 | | - driver behavior to follow default what is set on server side (note: starting ClickHouse 26.3 `async_insert` is on by default). |
8 | | - In second, this fix changes what number of affected rows returned by method like `java.sql.Statement.executeUpdate(java.lang.String)`. |
9 | | - Previously they return more accurate values because insert was synchronous, but in case of asynchronous insert it is not |
10 | | - guaranteed anymore (see also https://github.com/ClickHouse/ClickHouse/issues/57768). Read more about asynchronous insert https://clickhouse.com/docs/optimize/asynchronous-inserts. |
| 5 | +- **[jdbc-v2]** The driver no longer hardcodes the server settings `async_insert=0` and `wait_end_of_query=0` on every JDBC |
| 6 | + connection. This unblocks two scenarios that previously did not work: overriding these settings per connection or per |
| 7 | + statement, and using the driver against read-only profiles that disallow `SETTINGS` overrides. There are two consequences: |
| 8 | + - The driver now follows the server-side defaults for these settings (note: starting with ClickHouse 26.3, `async_insert` |
| 9 | + defaults to `1`). Removing the explicit `wait_end_of_query=0` is a no-op against server defaults but lets users opt in to |
| 10 | + `wait_end_of_query=1`. |
| 11 | + - The row count returned by `java.sql.Statement.executeUpdate(java.lang.String)` (and the matching `PreparedStatement` |
| 12 | + method) is no longer guaranteed to be accurate for INSERT statements when the server runs them asynchronously, and |
| 13 | + parsing/data errors in the INSERT body may not surface synchronously as a `SQLException`. Previously these were |
| 14 | + accurate because inserts were forced to be synchronous (see also https://github.com/ClickHouse/ClickHouse/issues/57768). |
| 15 | + To restore the previous behavior, set `async_insert=0` (or `wait_for_async_insert=1`) per connection or statement. |
| 16 | + Read more about asynchronous insert: https://clickhouse.com/docs/optimize/asynchronous-inserts. |
| 17 | + |
11 | 18 | (https://github.com/ClickHouse/clickhouse-java/issues/2652, https://github.com/ClickHouse/clickhouse-java/issues/2825) |
12 | 19 |
|
13 | 20 | ### New Features |
|
0 commit comments