Symptom
The OBServer node reports the Unknown thread id error for the UPDATE statement executed in ODC.
Possible causes
You can troubleshoot such issues in the following sequence: ODC or the database driver > Nginx or F5 > ODPs > OBServer nodes.
The default SQL query timeout period for database connections in ODC is 60s. However, the UPDATE statement takes about 70 seconds. Consequently, the driver determines that the statement times out and sends kill query command to the OBServer node through ODP.
The id field in the kill query command sent by the driver is the id field in the ODP Client connection response returned when the backend establishes the request. The id field is maintained within the ODP and is not shared among ODP nodes.
When ODC accesses the backend ODP cluster by using the NGINX/F5 address, the ODP that receives the kill query request is not the ODP connected to the OceanBase database. If the driver cannot obtain the correct id field, the unknown thread id error is returned.
Affected versions
All versions of client ODC and web ODC
Solutions
ODC versions earlier than V4.1.0
Increase the SQL query timeout value in the ODC connection configuration to prevent the kill query action for a timeout at the driver layer.
ODC V4.1.0 and later
Set the query timeout in the session variable
ob_query_timeout.