Description
Since it has been suspected that reverse DNS lookup can be the culprit in some connection delays, upon calling CouchbaseNode.connect for the first time, this case could be sanity-checked and logged to aid diagnostics:
the InetAddress.getHostName() will attempt to resolve and cache the hostname if it wasn't filled at construction, using a reverse DNS lookup.
the connect method starts by a log line, which calls getHostName()
prior to that step, the method should be called explicitely enclosed within a timing measurement, and a WARN log be issued stating that DNS resolution took N milliseconds (if above a reasonable threshold).
Attachments
For Gerrit Dashboard: JVMCBC-229 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
53861,3 | JVMCBC-229: Eagerly trigger DNS lookup and time it | master | couchbase-jvm-core | Status: MERGED | +2 | +1 |
55903,2 | JVMCBC-229: Eagerly trigger DNS lookup and time it | release11 | couchbase-jvm-core | Status: MERGED | +2 | +1 |