-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-25292 [branch-1] Improve InetSocketAddress usage discipline #2671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| this.socket.bind(this.rpcClient.localAddr); | ||
| } | ||
| NetUtils.connect(this.socket, remoteId.getAddress(), this.rpcClient.connectTO); | ||
| if (this.rpcClient.metrics != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change fixes a bug we encountered in production while running in Amazon's Elastic Kubernetes Service.
| private void connect() throws UnknownHostException { | ||
| if (LOG.isDebugEnabled()) { | ||
| LOG.debug("Connecting to " + remoteId.address); | ||
| LOG.debug("Connecting to " + remoteId.getAddress()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the netty version of the bug fix here: https://github.com/apache/hbase/pull/2671/files#diff-1a7ec27a8107293b6c87132823c262fc250570687a40f45646c43ae46dc6b04eR255
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
7d95a26 to
d927435
Compare
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
Network identities should be bound late. Remote addresses should be resolved at the last possible moment, just before connect(). Network identity mappings can change, so our code should not inappropriately cache them. Otherwise we might miss a change and fail to operate normally. Revert "HBASE-14544 Allow HConnectionImpl to not refresh the dns on errors" Removes hbase.resolve.hostnames.on.failure and related code. We always resolve hostnames, as late as possible. Preserve InetSocketAddress caching per RPC connection. Avoids potential lookups per Call. Replace InetSocketAddress with Address where used as a map key. If we want to key by hostname and/or resolved address we should be explicit about it. Using Address chooses mapping by hostname and port only. Add metrics for potential nameservice resolution attempts, whenever an InetSocketAddress is instantiated for connect; and metrics for failed resolution, whenever InetSocketAddress#isUnresolved on the new instance is true.
f23a7f2 to
56a4cd1
Compare
|
💔 -1 overall
This message was automatically generated. |
|
#2669 was merged, closing this and picking back the master commit. |
See description on #2669