ClickHouse / ClickHouse/clickhouse-java
`socket_keepalive` doesn't work with shaded clickhouse-jdbc
- 主要语言
- Java
- 星标
- 1.6k
- 派生
- 636
- 平均合并
- 2 天 23 小时
- 30 天内合并 PR
- 29
描述
## `socket_keepalive` doesnt' applied
### Steps to reproduce
Note: I would expect that instruction from official site[1] should end up with the same result.
1. Specify following option for apache/cloudberry-pxf:
```
jdbc.connection.property.socket_keepalive
true
```
or in JDBC URL `&socket_keepalive=true`
2. expect that `SO_KEEPALIVE=true`. However it is not.
Actual:
```
# ss -Otnpio state established | grep -F '8123'
0 0 [::ffff:10.1.0.9]:44198 [::ffff:10.1.0.20]:8123 users:(("java",pid=2731285,fd=34)) ts sack illinois wscale:10,4 rto:201 rtt:0.343/0.188
```
Expected (spot the `timer` section!):
```
0 0 [::ffff:10.1.0.29]:15938 [::ffff:10.1.0.20]:8123 users:(("java",pid=514753,fd=36)) timer:(keepalive,10sec,0) ts sack illinois wscale:10,4 rto:201 rtt:0.249/0.123
```
#### Environment
* Cloud
* Client version: 0.9.8 and 0.10.0
* OS: Ubuntu 22.04
#### ClickHouse Server
* ClickHouse Server version: 26.7.5.10
* `CREATE TABLE` statements for tables involved:
```
SELECT toInt32(sleep(600)) AS slept
SETTINGS
function_sleep_max_microseconds_per_block = 600000000,
max_execution_time = 0
```
[1] https://clickhouse.com/docs/integrations/language-clients/java/jdbc#linux
贡献指南
调研方向
首先,在 Ubuntu 22.04 上使用 ClickHouse Server 26.7.5.10 重现 JDBC 属性和 URL 形式,然后比较 shaded clickhouse-jdbc 客户端的 socket 行为。完成标准是,启用 socket_keepalive 后,受影响的客户端版本在 ss 输出中显示预期的 keepalive 计时器。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, linux
- 领域
- databases
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 52/100