anuragrai16 commented on code in PR #19064:
URL: https://github.com/apache/pinot/pull/19064#discussion_r3772810546


##########
pinot-core/src/main/java/org/apache/pinot/core/transport/QueryResponse.java:
##########
@@ -70,7 +70,11 @@ Map<ServerRoutingInstance, ServerResponse> 
getFinalResponses()
   long getServerResponseDelayMs(ServerRoutingInstance serverRoutingInstance);
 
   /**
-   * Returns the failed server if the query fails.
+   * Returns the server that went down during the query. Set when the query 
fails, and also when the query returns
+   * partial results under {@code skipUnavailableServers} (used by the failure 
detector to quarantine the server from
+   * routing). Because it can be set on a partial success, a non-null value 
does not by itself imply the query
+   * failed; check {@link #getException()} / {@link #getStatus()} for that. At 
most one server is tracked per query -
+   * when several servers go down, this holds the most recent one.
    */
   @Nullable
   ServerRoutingInstance getFailedServer();

Review Comment:
   Good call out. So, the contract/expectation change here is that a non-null 
values doesn't mean that the queries have failed (when `skipUnavailableServers` 
is set, it can still return results). Verified that there are 3 callers of this 
function, and none of them use the return of this value to decide whether 
queries failed or not, all of them look at the the real exception which is 
correct. 
   
   Claude analysis, 
   
   <img width="1183" height="354" alt="Image" 
src="https://github.com/user-attachments/assets/a569f9f7-ee01-43ec-ac27-b4e707a593d0";
 />



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