Tim Armstrong has posted comments on this change. ( http://gerrit.cloudera.org:8080/8410 )
Change subject: IMPALA-6118: Fix assertion failure in coordinator bloom filter updating ...................................................................... Patch Set 2: (2 comments) http://gerrit.cloudera.org:8080/#/c/8410/1/be/src/runtime/coordinator.cc File be/src/runtime/coordinator.cc: http://gerrit.cloudera.org:8080/#/c/8410/1/be/src/runtime/coordinator.cc@1180 PS1, Line 1180: } > It turns out string() has capacity 15 in GCC5.2 and 0 in GCC4.9. I think we I think this is a consequence of the small string optimisation in newer std::string implementations that can store small strings without allocating auxiliary storage. I'm guessing it works for up to 15 bytes in this case. http://gerrit.cloudera.org:8080/#/c/8410/2/be/src/runtime/coordinator.cc File be/src/runtime/coordinator.cc: http://gerrit.cloudera.org:8080/#/c/8410/2/be/src/runtime/coordinator.cc@1179 PS2, Line 1179: bloom_filter_.directory = string(); Calling clear() then shrink_to_fit() seems more explicit to me - the standard doesn't guarantee anything about what this does either and at least shrink_to_fit() is asking to reduce storage. -- To view, visit http://gerrit.cloudera.org:8080/8410 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia28f9eb8d0b3e795d798949a1cfcfeaaec7040ed Gerrit-Change-Number: 8410 Gerrit-PatchSet: 2 Gerrit-Owner: Tianyi Wang <tw...@cloudera.com> Gerrit-Reviewer: Alex Behm <alex.b...@cloudera.com> Gerrit-Reviewer: Tianyi Wang <tw...@cloudera.com> Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com> Gerrit-Comment-Date: Mon, 30 Oct 2017 22:44:24 +0000 Gerrit-HasComments: Yes