Mike Percy has posted comments on this change. Change subject: Rolling-upgrades compat for changing TSRegistrationPB ......................................................................
Patch Set 4: (2 comments) http://gerrit.cloudera.org:8080/#/c/4062/4/src/kudu/master/ts_descriptor.cc File src/kudu/master/ts_descriptor.cc: PS4, Line 68: using HostPortSet = std::unordered_set<HostPort, HostPort::Hasher, HostPort::EqualityPredicate>; : HostPortSet hostports; > Interesting, but why not just: Ah, I was planning on having to refer to the type and ended up never having to. Removed. PS4, Line 70: for (int i = 0; i < pb1.size(); i++) { : HostPort hp1; : if (!HostPortFromPB(pb1.Get(i), &hp1).ok()) return false; : hostports.insert(hp1); : } : for (int i = 0; i < pb1.size(); i++) { : HostPort hp2; : if (!HostPortFromPB(pb2.Get(i), &hp2).ok()) return false; : if (!ContainsKey(hostports, hp2)) { : return false; : } : } > You may be able to get away with unordered_sets of HostPortPB (maybe the ge This would have been really nice, but it doesn't work. I think it's probably easy with proto3. I partially took your advice with the unordered_set equality thing though. -- To view, visit http://gerrit.cloudera.org:8080/4062 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I794517d200b1c9ad74b3897b17aa808d68d7924b Gerrit-PatchSet: 4 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Mike Percy <mpe...@apache.org> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Mike Percy <mpe...@apache.org> Gerrit-Reviewer: Todd Lipcon <t...@apache.org> Gerrit-HasComments: Yes