KrishnajithUS opened a new issue, #152:
URL: https://github.com/apache/iotdb-client-go/issues/152
### Description:
Hi, I'm using iotdb **client go v2.0.3** with a TableSessionPool to run
queries. When a query takes too long and times out, instead of just returning
an error, the library crashes my entire application with a panic.
What I expected:
When a query times out, I expected to receive an error that I can handle in
my code and continue normally.
What actually happened:
The application crashes with a nil pointer panic immediately after the
timeout error.
### Steps to Reproduce:
Use TableSessionPool to execute a query
Query exceeds the timeout duration
Server returns timeout error (error code 712)
Application panics and crashes
### Logs
First the timeout error appears:
error IOTDB operation failed
{"error": "error code: 712, message: Current query is time out,
query start time is 1771997424871, ddl is 1771997425871,
current time is 1771997425872, please check your statement or
modify timeout parameter."}
Immediately followed by a crash:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x775c96]
goroutine 218 [running]:
github.com/apache/iotdb-client-go/v2/client.(*Session).Close(0xc002d6d2a8)
/go/pkg/mod/github.com/apache/iotdb-client-go/[email protected]/client/tablesessionpool.go:151
github.com/apache/iotdb-client-go/v2/rpc/client.go:19901
Environment:
iotdb-client-go version: v2.0.3-1
Go version: 1.xx
IoTDB server version: 2.x
OS: Linux
### Notes:
This only happens on query timeout, normal queries work fine
The panic happens during session cleanup after the timeout, not during the
query itself
This crash takes down the entire service, not just the failed query
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]