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

[GitHub] [druid] a2l007 commented on a diff in pull request #13358: Add start_time column to sys.servers

a2l007 commented on code in PR #13358:
URL: https://github.com/apache/druid/pull/13358#discussion_r1157522444


##########
server/src/main/java/org/apache/druid/curator/announcement/Announcer.java:
##########
@@ -314,7 +313,7 @@ public void childEvent(CuratorFramework client, PathChildrenCacheEvent event) th
         if (oldBytes == null) {
           created = true;
         } else if (!Arrays.equals(oldBytes, bytes)) {
-          throw new IAE("Cannot reannounce different values under the same path");
+          log.error("Ignoring attempt to announce different values under same path");

Review Comment:
   When the coordinator is run in overlord mode, Announcer.announce() is called twice since the Announcer module is part of the coordinator and overlord lifecycle modules. The second call is a no-op since the existing DiscoveryDruidNode bytes announced at the path is the same as the node bytes in the second call.
   With this patch, the start time is now part of DiscoveryDruidNode and so in some cases, there could be a millisecond delay between the two announce calls. This causes the node objects to be different and the second announce call fails due to the validation check.
   I couldn't find another scenario where it would be useful to fail the process in this condition and so I'm logging it here instead. Let me know if you have any thoughts on this approach.



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