Jackie-Jiang commented on code in PR #19172:
URL: https://github.com/apache/pinot/pull/19172#discussion_r3731968383


##########
pinot-core/src/main/java/org/apache/pinot/core/transport/AsyncQueryResponse.java:
##########
@@ -186,6 +186,19 @@ void receiveDataTable(ServerRoutingInstance 
serverRoutingInstance, DataTable dat
     _countDownLatch.countDown();
   }
 
+  /// Handles a deserialization error for a single server response without 
failing the entire query. The server
+  /// response is recorded as failed (no DataTable), and the latch is 
decremented for this server only so that the
+  /// query can complete with partial results from the remaining servers 
instead of waiting for the full timeout.
+  void receiveDataTableDeserializationError(ServerRoutingInstance 
serverRoutingInstance) {
+    ServerResponse response = _responseMap.get(serverRoutingInstance);
+    if (response != null && response.getDataTable() == null) {

Review Comment:
   Could this every be `null` or having a data table?
   
   Should we count this as a failed server, or form a `DataTable` wrapping the 
exception and reuse `receiveDataTable()` flow



##########
pinot-spi/src/main/java/org/apache/pinot/spi/exception/QueryErrorCode.java:
##########
@@ -66,6 +66,10 @@ public enum QueryErrorCode {
   UNKNOWN_COLUMN(710, "UnknownColumnError", Response.Status.BAD_REQUEST),
   /// Error while planning the query. For example, trying to run a colocated 
join on non-colocated tables.
   QUERY_PLANNING(720, "QueryPlanningError", Response.Status.BAD_REQUEST),
+  /// Error deserializing a DataTable response from a server. The server sent 
back bytes that the broker could not
+  /// deserialize, so the query will complete with partial results from the 
other servers instead of waiting for the
+  /// full timeout.
+  DATA_TABLE_DESERIALIZATION_ERROR(426, "DataTableDeserializationError", 
Response.Status.INTERNAL_SERVER_ERROR),

Review Comment:
   (minor) Insert it in the right position



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