diff --git a/velox/dwio/common/CacheInputStream.cpp b/velox/dwio/common/CacheInputStream.cpp index dedda0c72f6a7..cc03b925596f4 100644 --- a/velox/dwio/common/CacheInputStream.cpp +++ b/velox/dwio/common/CacheInputStream.cpp @@ -301,14 +301,14 @@ bool CacheInputStream::loadFromSsd( MicrosecondTimer timer(&ssdLoadUs); file.load(ssdPins, pins); } catch (const std::exception& e) { - LOG(ERROR) << "IOERR: Failed SSD loadSync " << entry.toString() << ' ' - << e.what() << process::TraceContext::statusLine() - << fmt::format( - "stream region {} {}b, start of load {} file {}", - region_.offset, - region_.length, - region.offset - region_.offset, - fileIds().string(fileNum_)); + // LOG(ERROR) << "IOERR: Failed SSD loadSync " << entry.toString() << ' ' + // << e.what() << process::TraceContext::statusLine() + // << fmt::format( + // "stream region {} {}b, start of load {} file {}", + // region_.offset, + // region_.length, + // region.offset - region_.offset, + // fileIds().string(fileNum_)); // Remove the non-loadable entry so that next access goes to storage. file.erase(cache::RawFileCacheKey{fileNum_, region.offset}); pin_ = std::move(pins[0]); diff --git a/velox/exec/fuzzer/CacheFuzzer.cpp b/velox/exec/fuzzer/CacheFuzzer.cpp index d4a443e04fa03..dd272495680e1 100644 --- a/velox/exec/fuzzer/CacheFuzzer.cpp +++ b/velox/exec/fuzzer/CacheFuzzer.cpp @@ -28,7 +28,6 @@ #include "velox/common/memory/MmapAllocator.h" #include "velox/dwio/common/CachedBufferedInput.h" #include "velox/exec/tests/utils/TempDirectoryPath.h" -#include "velox/vector/fuzzer/Utils.h" DEFINE_int32(steps, 10, "Number of plans to generate and test."); @@ -498,6 +497,10 @@ void CacheFuzzer::go() { FLAGS_steps > 0 || FLAGS_duration_sec > 0, "Either --steps or --duration_sec needs to be greater than zero."); + // O_DIRECT requires I/O size needs to be the same as a disk file block size + // which is not handled in SSD cache. Misalignment can lead to EINVAL in some + // filesystem and kernel version. + FLAGS_ssd_odirect = false; auto startTime = std::chrono::system_clock::now(); size_t iteration = 0;