Adar Dembo has submitted this change and it was merged. Change subject: binary_plain_block: fix an incorrect vector.reserve() ......................................................................
binary_plain_block: fix an incorrect vector.reserve() I noticed the following surprising stack trace on a tserver: Thread 118 (Thread 0x7f9a865ff700 (LWP 1332)): #0 0x0000003ae0a89b40 in _wordcopy_fwd_aligned () from /lib64/libc.so.6 #1 0x0000003ae0a83992 in memmove () from /lib64/libc.so.6 #2 0x0000000001018dee in void std::vector<unsigned int, std::allocator<unsigned int> >::_M_emplace_back_aux<unsigned int>(unsigned int&&) () #3 0x00000000018c8b15 in emplace_back<unsigned int> (this=0x7f9a858304b0) at /opt/rh/devtoolset-3/root/usr/include/c++/4.9.2/bits/vector.tcc:101 #4 push_back (this=0x7f9a858304b0) at /opt/rh/devtoolset-3/root/usr/include/c++/4.9.2/bits/stl_vector.h:932 #5 kudu::cfile::BinaryPlainBlockDecoder::ParseHeader (this=0x7f9a858304b0) at ../../src/kudu/cfile/binary_plain_block.cc:225 #6 0x00000000018d4ffa in kudu::cfile::CFileIterator::PrepareForNewSeek (this=0x7f9a858e4d00) at ../../src/kudu/cfile/cfile_reader.cc:724 This implied that the emplace_back calls in the block decoder were actually causing reallocation. The issue is that the reserve() was not appropriately large. Change-Id: Id3688e2c9e71bd05b5386e939c9582b707e57ff3 Reviewed-on: http://gerrit.cloudera.org:8080/5734 Tested-by: Kudu Jenkins Reviewed-by: Adar Dembo <[email protected]> --- M src/kudu/cfile/binary_plain_block.cc 1 file changed, 3 insertions(+), 1 deletion(-) Approvals: Adar Dembo: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/5734 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id3688e2c9e71bd05b5386e939c9582b707e57ff3 Gerrit-PatchSet: 2 Gerrit-Project: kudu Gerrit-Branch: master Gerrit-Owner: Todd Lipcon <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot
