kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [kudu] 02/02: [cfile] No longer need to `relocate()` in `ReadBlock()`
Date Mon, 18 Nov 2019 05:24:33 GMT
This is an automated email from the ASF dual-hosted git repository.

adar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 24cf1c948d07676cfc567b73cef7792a38d1809e
Author: lingbin <lingbinlb@gmail.com>
AuthorDate: Tue Nov 12 11:50:57 2019 +0800

    [cfile] No longer need to `relocate()` in `ReadBlock()`
    In the current implementation, when reading data from
    `ReadableBlock`, the `Slice` object will no longer be
    modified, but just fill it with data.  That is,
    slice->data() will always match pre-allocated buffer.
    Change-Id: I1619d05d42c9ec20e029097aaaf37b3ac93b9a69
    Reviewed-on: http://gerrit.cloudera.org:8080/14693
    Reviewed-by: Adar Dembo <adar@cloudera.com>
    Tested-by: Kudu Jenkins
 src/kudu/cfile/cfile_reader.cc | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/kudu/cfile/cfile_reader.cc b/src/kudu/cfile/cfile_reader.cc
index 12794a0..5ebc193 100644
--- a/src/kudu/cfile/cfile_reader.cc
+++ b/src/kudu/cfile/cfile_reader.cc
@@ -536,12 +536,6 @@ Status CFileReader::ReadBlock(const IOContext* io_context, const BlockPointer
     // Set the result block to our decompressed data.
     block = Slice(buf, uncompressed_size);
-  } else {
-    // Some of the File implementations from LevelDB attempt to be tricky
-    // and just return a Slice into an mmapped region (or in-memory region).
-    // But, this is hard to program against in terms of cache management, etc,
-    // so we memcpy into our scratch buffer if necessary.
-    block.relocate(scratch.get());
   // It's possible that one of the TryAllocateFromCache() calls above

View raw message