diff --git a/dwio/nimble/common/tests/TestUtils.h b/dwio/nimble/common/tests/TestUtils.h index 9cd14ecc..3c1bb15c 100644 --- a/dwio/nimble/common/tests/TestUtils.h +++ b/dwio/nimble/common/tests/TestUtils.h @@ -307,12 +307,14 @@ class InMemoryTrackableReadFile final : public velox::ReadFile { NIMBLE_NOT_SUPPORTED("Not used by Nimble"); } - void preadv( + uint64_t preadv( folly::Range regions, folly::Range iobufs) const override { VELOX_CHECK_EQ(regions.size(), iobufs.size()); + uint64_t length = 0; for (size_t i = 0; i < regions.size(); ++i) { const auto& region = regions[i]; + length += region.length; auto& output = iobufs[i]; if (shouldProduceChainedBuffers_) { chunks_.wlock()->push_back({region.offset, region.length}); @@ -332,6 +334,8 @@ class InMemoryTrackableReadFile final : public velox::ReadFile { output.append(region.length); } } + + return length; } uint64_t size() const final { diff --git a/dwio/nimble/tablet/TabletReader.cpp b/dwio/nimble/tablet/TabletReader.cpp index b32f1c1a..ce1c56da 100644 --- a/dwio/nimble/tablet/TabletReader.cpp +++ b/dwio/nimble/tablet/TabletReader.cpp @@ -33,16 +33,6 @@ namespace facebook::nimble { -DEFINE_bool( - nimble_disable_coalesce, - false, - "Disable read coalescing in Nimble reader."); - -DEFINE_uint64( - nimble_coalesce_max_distance, - 1024 * 1024 * 1.25, - "Maximum read coalescing distance in Nimble reader. And gap smaller than this value will be coalesced."); - // Here's the layout of the tablet: // // stripe 1 streams @@ -59,6 +49,7 @@ DEFINE_uint64( // 2 bytes major version + 2 bytes minor version + // 4 bytes magic number. namespace { + template const T* asFlatBuffersRoot(std::string_view content) { return flatbuffers::GetRoot(content.data());