waterWang opened a new pull request, #19172:
URL: https://github.com/apache/pinot/pull/19172

   Fixes #18866
   
   ## Problem
   When a Pinot server sends back a response that the broker cannot deserialize 
into a `DataTable`, the `DataTableHandler` catch block only logs the error and 
bumps a metric — it never signals the query. The query then blocks until the 
full broker timeout expires and returns a misleading `BROKER_TIMEOUT` with 
partial results.
   
   **Side effects** (beyond the timeout):
   - Failure detector is not notified, so the bad server keeps receiving queries
   - Routing stats charge the full timeout as latency for the bad server
   - Generic timeout metric hides the real cause
   
   ## Fix
   1. **`QueryErrorCode.java`**: Add `DATA_TABLE_DESERIALIZATION_ERROR(426)` to 
distinguish deserialization failures from generic internal errors and timeouts.
   
   2. **`AsyncQueryResponse.java`**: Add 
`receiveDataTableDeserializationError()` — counts down the latch for this 
server only (without failing the entire query), records the failed server, and 
sets the exception. This allows the query to complete with partial results from 
the remaining healthy servers.
   
   3. **`QueryRouter.java`**: Add `receiveDataTableDeserializationError()` — 
iterates over in-flight queries and marks any still waiting on this server.
   
   4. **`DataTableHandler.java`**: In the catch block, call 
`_queryRouter.receiveDataTableDeserializationError()` instead of silently 
logging.
   
   5. **`QueryRoutingTest.java`**: Add `testDataTableDeserializationError()` — 
sends garbage bytes as the server response and verifies the query completes in 
under 1 second instead of waiting for the 10-second timeout.
   
   ## Testing
   - New test: `testDataTableDeserializationError()` — sends `new 
byte[]{0,1,2,3,4,5}` as server response, verifies query completes in < 1s (not 
10s timeout)
   - Existing tests unchanged


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to