Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/8280 )
Change subject: mini-cluster: support parallel multi-master clusters ...................................................................... Patch Set 3: (4 comments) http://gerrit.cloudera.org:8080/#/c/8280/3//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/8280/3//COMMIT_MSG@11 PS3, Line 11: This allows for a few : simplifications: There's only one simplification in this list now. http://gerrit.cloudera.org:8080/#/c/8280/3/src/kudu/mini-cluster/external_mini_cluster.cc File src/kudu/mini-cluster/external_mini_cluster.cc: http://gerrit.cloudera.org:8080/#/c/8280/3/src/kudu/mini-cluster/external_mini_cluster.cc@317 PS3, Line 317: vector<unique_ptr<Socket>> reserved_sockets; Worth a comment explaining why it's OK for this to go out of scope after all of the masters have been started. Actually, if we're going to close the different-process-grabs-our-port-during-restart race, shouldn't we keep this alive for the lifetime of the cluster? http://gerrit.cloudera.org:8080/#/c/8280/3/src/kudu/mini-cluster/internal_mini_cluster.cc File src/kudu/mini-cluster/internal_mini_cluster.cc: http://gerrit.cloudera.org:8080/#/c/8280/3/src/kudu/mini-cluster/internal_mini_cluster.cc@119 PS3, Line 119: vector<unique_ptr<Socket>> reserved_sockets; Likewise. http://gerrit.cloudera.org:8080/#/c/8280/3/src/kudu/mini-cluster/mini_cluster.cc File src/kudu/mini-cluster/mini_cluster.cc: http://gerrit.cloudera.org:8080/#/c/8280/3/src/kudu/mini-cluster/mini_cluster.cc@80 PS3, Line 80: socket->reset(new Socket()); Style nit: prefer the calling convention where OUT params are unmodified in the event of an error. So, set up a local unique_ptr<Socket> and swap to 'socket' when you can no longer fail. -- To view, visit http://gerrit.cloudera.org:8080/8280 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0b0ff7bfc179d8fdb1ed306d1bbd12acddeb060c Gerrit-Change-Number: 8280 Gerrit-PatchSet: 3 Gerrit-Owner: Dan Burkert <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Comment-Date: Mon, 30 Apr 2018 18:27:07 +0000 Gerrit-HasComments: Yes
