Alexey Serbin has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/13469 )

Change subject: KUDU-2791: TTL cache in DNS resolver (part 2)
......................................................................


Patch Set 2:

(6 comments)

http://gerrit.cloudera.org:8080/#/c/13469/2/src/kudu/consensus/consensus_peers.cc
File src/kudu/consensus/consensus_peers.cc:

http://gerrit.cloudera.org:8080/#/c/13469/2/src/kudu/consensus/consensus_peers.cc@576
PS2, Line 576: std::
> Can drop this?
Done


http://gerrit.cloudera.org:8080/#/c/13469/2/src/kudu/kserver/kserver.h
File src/kudu/kserver/kserver.h:

http://gerrit.cloudera.org:8080/#/c/13469/2/src/kudu/kserver/kserver.h@65
PS2, Line 65:   // Get DNS resolver for this server.
> I might push the DnsResolver into ServerBase, since it's not Kudu-specific
Done


http://gerrit.cloudera.org:8080/#/c/13469/2/src/kudu/kserver/kserver.h@72
PS2, Line 72:   std::shared_ptr<DnsResolver> dns_resolver_;
> Why shared ownership?
I thought it might be used by objects which are still alive when KuduServer is 
already destroyed.  That's not the case, it seems: KuduServers are in the 
top-level in the main() function.


http://gerrit.cloudera.org:8080/#/c/13469/2/src/kudu/master/ts_descriptor.h
File src/kudu/master/ts_descriptor.h:

http://gerrit.cloudera.org:8080/#/c/13469/2/src/kudu/master/ts_descriptor.h@66
PS2, Line 66:                             std::shared_ptr<DnsResolver> 
dns_resolver,
> Should be able to pass the DnsResolver as a raw pointer; its lifetime will
Good catch.  At some point I thought it would be necessary to keep it in 
TSDescriptor for further operations, but it seems all TSDescriptors are gone 
before resolver is destroyed.


http://gerrit.cloudera.org:8080/#/c/13469/2/src/kudu/master/ts_descriptor.cc
File src/kudu/master/ts_descriptor.cc:

http://gerrit.cloudera.org:8080/#/c/13469/2/src/kudu/master/ts_descriptor.cc@144
PS2, Line 144:   dns_resolver_ = std::move(dns_resolver);
> Where is this actually used?
Fixed -- it's used in TSDescriptor::ResolveSockaddr()


http://gerrit.cloudera.org:8080/#/c/13469/2/src/kudu/tserver/heartbeater.cc
File src/kudu/tserver/heartbeater.cc:

http://gerrit.cloudera.org:8080/#/c/13469/2/src/kudu/tserver/heartbeater.cc@339
PS2, Line 339:   RETURN_NOT_OK(MasterServiceProxyForHostPort(master_address_,
             :                                               
server_->messenger(),
             :                                               
server_->dns_resolver().get(),
             :                                               &new_proxy));
> Seems like this method would be simpler if it was a member rather than a fr
Done



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

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib22e87d28573fdb93ba18cd6d99d8bde7524a4fc
Gerrit-Change-Number: 13469
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Sun, 02 Jun 2019 07:24:49 +0000
Gerrit-HasComments: Yes

Reply via email to