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


##########
server/src/main/java/org/apache/druid/discovery/DruidLeaderClient.java:
##########
@@ -256,15 +257,21 @@ public String findCurrentLeader()
     );
   }
 
-  private String getCurrentKnownLeader(final boolean cached) throws IOException
+  private String getCurrentKnownLeader(final boolean cached)
   {
     final String leader = currentKnownLeader.accumulateAndGet(
         null,
         (current, given) -> current == null || !cached ? pickOneHost() : 
current
     );
 
     if (leader == null) {
-      throw new IOE("No known server");
+      throw DruidException.forPersona(DruidException.Persona.ADMIN)
+                          .ofCategory(DruidException.Category.NOT_FOUND)

Review Comment:
   I wasn't sure between the two. I also think `RUNTIME_FAILURE` is apt since 
the leader server wasn't set and hence couldn't be found due to some failure.



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