Skip to content

Commit 7f1e4ef

Browse files
zhouyuanfacebook-github-bot
authored andcommitted
fix(fuzz): Fix ssd cache o_direct flag in cache fuzz test (facebookincubator#12523)
Summary: the flag for should be `velox_ssd_odirect` https://github.com/facebookincubator/velox/blob/main/velox/flag_definitions/flags.cpp#L128 Pull Request resolved: facebookincubator#12523 Reviewed By: xiaoxmeng Differential Revision: D70909301 Pulled By: Yuhta fbshipit-source-id: 14db40046fed4c2a3306066c65ea32d74a207d52
1 parent 35a1247 commit 7f1e4ef

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

velox/common/caching/SsdFile.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -968,8 +968,12 @@ void SsdFile::readCheckpoint() {
968968
memory::memoryManager()->cachePool());
969969
} catch (std::exception& e) {
970970
++stats_.openCheckpointErrors;
971-
VELOX_SSD_CACHE_LOG(WARNING)
972-
<< fmt::format("Error openning checkpoint file {}: ", e.what());
971+
// Either the checkpoint file is corrupted or the file is just created, we
972+
// can start here and the writer threads will create the checkpoint file
973+
// later on flush
974+
VELOX_SSD_CACHE_LOG(WARNING) << fmt::format(
975+
"Error opening checkpoint file {}: Starting without checkpoint",
976+
e.what());
973977
return;
974978
}
975979

velox/exec/fuzzer/CacheFuzzer.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ DEFINE_int32(
6666
-1,
6767
"Number of SSD cache shards. When set to -1, a random value from 1 to 4 will be used, inclusively.");
6868

69-
DEFINE_bool(ssd_odirect, true, "Use O_DIRECT for SSD cache IO");
69+
DECLARE_bool(velox_ssd_odirect);
7070

7171
DEFINE_int64(
7272
ssd_checkpoint_interval_bytes,
@@ -505,7 +505,7 @@ void CacheFuzzer::go() {
505505
// filesystem and kernel version.
506506
//
507507
// TODO: add this support if needed later.
508-
FLAGS_ssd_odirect = false;
508+
FLAGS_velox_ssd_odirect = false;
509509
auto startTime = std::chrono::system_clock::now();
510510
size_t iteration = 0;
511511

0 commit comments

Comments
 (0)