You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "findingrish (via GitHub)" <gi...@apache.org> on 2023/04/04 12:52:56 UTC

[GitHub] [druid] findingrish commented on a diff in pull request #13967: Detect segment unavailability for queries in broker

findingrish commented on code in PR #13967:
URL: https://github.com/apache/druid/pull/13967#discussion_r1157202833


##########
server/src/main/java/org/apache/druid/client/CachingClusteredClient.java:
##########
@@ -462,6 +462,10 @@ private Set<SegmentServerSelector> computeSegmentsToQuery(
               chunk.getChunkNumber()
           );
           segments.add(new SegmentServerSelector(server, segment));
+          if (server.isEmpty()) {
+            // fail the query or alternatively set some headers
+            throw new RuntimeException("Query failed, incomplete data");

Review Comment:
   Throwing `QueryException` with details of unavailable segment ids when the config is set to `fail`.
   Also, logging a warning message with the details. 
   



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org