You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/09/29 05:10:13 UTC

[GitHub] [helix] jiajunwang commented on a change in pull request #1417: Add host name to the Participant History znode.

jiajunwang commented on a change in pull request #1417:
URL: https://github.com/apache/helix/pull/1417#discussion_r496409242



##########
File path: helix-core/src/main/java/org/apache/helix/model/ParticipantHistory.java
##########
@@ -76,7 +80,15 @@ public void reportOffline() {
    * @return
    */
   public void reportOnline(String sessionId, String version) {
-    updateSessionHistory(sessionId, version);
+    String hostname;
+    try {
+      hostname = InetAddress.getLocalHost().getHostName();
+    } catch (UnknownHostException e) {
+      LOG.error("Failed to get host name. Use {} for the participant history recording.",

Review comment:
       This error indicates the IP of this host cannot be translated to a hostname. This may lead to some connectivity issues. Moreover, the information record in history will be wrong. So I think it is ERROR instead of WARN. If such case happen frequently, then the application admin needs to take a look.




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org