Mike Percy has posted comments on this change.

Change subject: [net_util] fix reporting getaddrinfo() error
......................................................................


Patch Set 2:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/7368/2/src/kudu/util/net/net_util.cc
File src/kudu/util/net/net_util.cc:

Line 313:           gai_strerror(rc));
1. For clarity, instead of "canonical name", can we say "canonical hostname"?

2. according to the man page, rc == EAI_SYSTEM requires checking errno:

       EAI_SYSTEM
              Other system error, check errno for details.

So this should probably be something like:

    if (rc != 0) {
      string msg = Substitute("Unable to lookup canonical hostname for '$0'", 
*hostname);
      if (rc != EAI_SYSTEM) {
        return Status::NetworkError(msg, gai_strerror(rc));
      }
      return Status::NetworkError(msg, ErrnoToString(errno), errno);
    }


-- 
To view, visit http://gerrit.cloudera.org:8080/7368
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2d5ba87b9ea050724367610461bae22c9471a103
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Edward Fancher <[email protected]>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <[email protected]>
Gerrit-Reviewer: Todd Lipcon <[email protected]>
Gerrit-HasComments: Yes

Reply via email to