Hi all,
I'm Yann Massard, a developer at AVILOO. We want to use IoTDB through
the Java `SessionPool`. But we discovered a problem:
After short connectivity losses (DataNode pod restarts, ConfigNode
leader churn), our client got stuck: every query failed with
`NullPointerException: ... because "execResp" is null` until we
restarted the JVM. The problem is when
`SessionConnection.callWithRetryAndReconnect` runs out of retries, it
returns a null result instead of throwing. Callers then throw an NPE.
The real `TException` is lost, and `SessionPool` puts the broken session
back into its queue instead of evicting it.
The fix is small: `callWithRetryAndReconnect` now throws
`IoTDBConnectionException` with the `TException` as its cause, so
`SessionPool`'s existing eviction path takes over. It's one helper
change that covers all callers. I also wrote some tests to demonstrate
the problem / fix.
- PR: https://github.com/apache/iotdb/pull/18794
- Issue: None yet. Do you want me to create one or is the PR enough?
I'd be grateful if someone familiar with the session client could take a
look at the PR. Copilot seems to be happy with it.
Best,
Yann