Lars Volker has posted comments on this change.

Change subject: IMPALA-5499: avoid ephemeral port conflicts
......................................................................


Patch Set 1:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/7171/1/be/src/statestore/statestore-test.cc
File be/src/statestore/statestore-test.cc:

Line 76:   int subscriber_port = FindUnusedEphemeralPort(&used_ports);
you could assert that used_ports.back() == subscriber_port here and elsewhere. 
Or more generally that it is contained in the list if you don't want to assume 
a particular order.


http://gerrit.cloudera.org:8080/#/c/7171/1/be/src/util/network-util.cc
File be/src/util/network-util.cc:

Line 206:     ++tries;
Shouldn't this be above the continue, possibly at the start of the loop? 
Otherwise tries that end up picking a port in used_ports will not be counted 
correctly.


http://gerrit.cloudera.org:8080/#/c/7171/1/be/src/util/network-util.h
File be/src/util/network-util.h:

Line 70: int FindUnusedEphemeralPort(std::vector<int>* used_ports);
You could make this default to nullptr.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id02c83e6f946a14b83f5e6561957d7ad81442835
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <[email protected]>
Gerrit-Reviewer: Lars Volker <[email protected]>
Gerrit-Reviewer: Sailesh Mukil <[email protected]>
Gerrit-Reviewer: anujphadke <[email protected]>
Gerrit-HasComments: Yes

Reply via email to