Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/8041 )
Change subject: KUDU-2055 [part 2]: Add util to construct sorted disjoint interval list ...................................................................... Patch Set 6: (2 comments) http://gerrit.cloudera.org:8080/#/c/8041/6/src/kudu/util/sorted_disjoint_interval_list.h File src/kudu/util/sorted_disjoint_interval_list.h: http://gerrit.cloudera.org:8080/#/c/8041/6/src/kudu/util/sorted_disjoint_interval_list.h@88 PS6, Line 88: if (tail != cur_tail) { I believe this is supposed to be 'head != cur_tail'. 'tail != cur_tail' is a tautology because of how cur_tail is defined. Please add tests for this case, this is showing a big lack of coverage. Also, perhaps simpler as: } else { ++head; if (head != tail) { *head = std::move(*tail); } ++ tail; } http://gerrit.cloudera.org:8080/#/c/8041/6/src/kudu/util/sorted_disjoint_interval_list.h@95 PS6, Line 95: if (++head != tail) intervals->erase(head, tail); Is this if check necessary? I would think vector::erase would check if it's 0 length already. -- To view, visit http://gerrit.cloudera.org:8080/8041 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I61a813c047be4882f246eaf404598e7e18fcac87 Gerrit-Change-Number: 8041 Gerrit-PatchSet: 6 Gerrit-Owner: Hao Hao <hao....@cloudera.com> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Dan Burkert <danburk...@apache.org> Gerrit-Reviewer: David Ribeiro Alves <davidral...@gmail.com> Gerrit-Reviewer: Hao Hao <hao....@cloudera.com> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <t...@apache.org> Gerrit-Comment-Date: Mon, 25 Sep 2017 18:51:14 +0000 Gerrit-HasComments: Yes