Andrew Wong has posted comments on this change. Change subject: generic_iterators: avoid holding completed iters in merge/union ......................................................................
Patch Set 1: (2 comments) http://gerrit.cloudera.org:8080/#/c/6460/1/src/kudu/common/generic_iterators.cc File src/kudu/common/generic_iterators.cc: Line 325: iters_.assign(iters.begin(), iters.end()); > iters_ here is a std::deque whereas 'iters' is a vector, so we have to use I see, so we're avoiding extra shared_ptr copies by not tracking all_iters, and this gives us the result we want. http://gerrit.cloudera.org:8080/#/c/6460/1/src/kudu/common/generic_iterators.h File src/kudu/common/generic_iterators.h: Line 43: // a subset of the columns in 'iters'. > well, since C++11 we've actually moved more towards this style for argument So we're copying the input iterators because each subiterator is a shared_ptr, and this allows each one to be cleaned up once used. I'm not seeing where orig_iters_ stops holding the subiterators. Even if it's pushing onto iters_, don't the shared_ptrs still exist in orig_ptrs_? -- To view, visit http://gerrit.cloudera.org:8080/6460 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8e068c256c5855efeff5c6325dbb5fbf770eb900 Gerrit-PatchSet: 1 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Todd Lipcon <t...@apache.org> Gerrit-Reviewer: Andrew Wong <andrew.w...@cloudera.com> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: David Ribeiro Alves <dral...@apache.org> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <t...@apache.org> Gerrit-HasComments: Yes