Todd Lipcon has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/15800 )
Change subject: KUDU-2844 (1/3): make BlockHandle ref-counted ...................................................................... KUDU-2844 (1/3): make BlockHandle ref-counted This is the first in a series of patches that will lead up to allowing a BlockDecoder to take a reference to a data block and attach it to a RowBlock when decoding rows, ensuring that the data block doesn't get deallocated until the RowBlock has been serialized back to the client. Note that the input to block decoders can be either references to blocks in the block cache, or "owned" blocks which hold onto the memory directly. As such, we need to ref-count the BlockHandle abstraction rather than adding an additional reference to the already-ref-counted BlockCacheHandle. To accomplish this, this changes BlockHandle to be a heap-allocated refcounted object. It also changes the various BlockDecoders to take in a moved BlockHandle instead of just the Slice. Change-Id: I1077fcc841ca31a2cb523769fffeed2d27782bc1 Reviewed-on: http://gerrit.cloudera.org:8080/15800 Reviewed-by: Andrew Wong <[email protected]> Reviewed-by: Alexey Serbin <[email protected]> Tested-by: Kudu Jenkins --- M src/kudu/cfile/binary_dict_block.cc M src/kudu/cfile/binary_dict_block.h M src/kudu/cfile/binary_plain_block.cc M src/kudu/cfile/binary_plain_block.h M src/kudu/cfile/binary_prefix_block.cc M src/kudu/cfile/binary_prefix_block.h M src/kudu/cfile/block_cache.h M src/kudu/cfile/block_handle.h M src/kudu/cfile/bloomfile.cc M src/kudu/cfile/bshuf_block.h M src/kudu/cfile/cfile-test.cc M src/kudu/cfile/cfile_reader.cc M src/kudu/cfile/cfile_reader.h M src/kudu/cfile/encoding-test.cc M src/kudu/cfile/index_btree.cc M src/kudu/cfile/index_btree.h M src/kudu/cfile/plain_bitmap_block.h M src/kudu/cfile/plain_block.h M src/kudu/cfile/rle_block.h M src/kudu/cfile/type_encodings.cc M src/kudu/cfile/type_encodings.h M src/kudu/tablet/deltafile.cc M src/kudu/tablet/deltafile.h 23 files changed, 295 insertions(+), 220 deletions(-) Approvals: Andrew Wong: Looks good to me, approved Alexey Serbin: Looks good to me, approved Kudu Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/15800 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I1077fcc841ca31a2cb523769fffeed2d27782bc1 Gerrit-Change-Number: 15800 Gerrit-PatchSet: 5 Gerrit-Owner: Todd Lipcon <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Andrew Wong <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-Reviewer: Volodymyr Verovkin <[email protected]>
