Andrew Wong has uploaded this change for review. ( http://gerrit.cloudera.org:8080/17839
Change subject: wip [rpc] KUDU-75: refresh DNS entries if proxies hit a network error ...................................................................... wip [rpc] KUDU-75: refresh DNS entries if proxies hit a network error wip: - I don't love the approach of using a lock to protect the connection ID in the proxy. Maybe it's unavoidable. - Also unclear whether we should force all Proxies to abide by this new implementation, or have a separate class or mode that doesn't re-resolve on failure. - I plan on splitting out the DnsResolver change into a separate patch. - The retry logic is very coarse -- we currently will just check for a network error. There is likely something more specific we can add to the controller to signal that we couldn't send the request. - Needs more tests. This patch aims to tackle the following issues that revolve around changes in addresses at runtime. - KUDU-1885: master long-lived tserver proxies need to be re-resolved in case nodes are assigned different addresses; today we just retry at the same location forever. - KUDU-1620: tablet consensus long-lived proxies need to be re-resolved on failure. - C++ clients' usages of RemoteTabletServer also have long-lived proxies and are likely to run into similar problems if tservers are restarted and assigned new physical addresses. It addresses this by plumbing a DnsResolver into the rpc::Proxy class, and chaining the asynchronous callback to an asynchronous refresh of the address with the newly introduced refreshing capabilities of the DnsResolver. Change-Id: I777d169bd3a461294e5721f05071b726ced70f7e --- M src/kudu/rpc/CMakeLists.txt M src/kudu/rpc/connection_id.h M src/kudu/rpc/outbound_call.cc M src/kudu/rpc/outbound_call.h M src/kudu/rpc/protoc-gen-krpc.cc A src/kudu/rpc/proxy-test.cc M src/kudu/rpc/proxy.cc M src/kudu/rpc/proxy.h M src/kudu/rpc/rpc-test-base.h M src/kudu/util/net/dns_resolver-test.cc M src/kudu/util/net/dns_resolver.cc M src/kudu/util/net/dns_resolver.h M src/kudu/util/net/net_util.cc M src/kudu/util/ttl_cache.h 14 files changed, 337 insertions(+), 21 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/39/17839/1 -- To view, visit http://gerrit.cloudera.org:8080/17839 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I777d169bd3a461294e5721f05071b726ced70f7e Gerrit-Change-Number: 17839 Gerrit-PatchSet: 1 Gerrit-Owner: Andrew Wong <[email protected]>
