Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions be/test/olap/rowset/segment_v2/segment_corruption_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,12 @@ class SegmentCorruptionTest : public testing::Test {
// background threads from accessing SyncPoint during/after destruction
SyncPoint::get_instance()->disable_processing();

if (ExecEnv::GetInstance()->file_cache_factory() != nullptr) {
io::FileCacheFactory::instance()->clear_file_caches(true);
auto* factory = io::FileCacheFactory::instance();
if (factory != nullptr) {
factory->clear_file_caches(true);

factory->_caches.clear();
factory->_path_to_cache.clear();
}

// Give background threads time to stop after cache destruction
Expand Down Expand Up @@ -132,8 +136,12 @@ class SegmentCorruptionTest : public testing::Test {
// background threads from accessing SyncPoint during/after destruction
SyncPoint::get_instance()->disable_processing();

if (ExecEnv::GetInstance()->file_cache_factory() != nullptr) {
io::FileCacheFactory::instance()->clear_file_caches(true);
auto* factory = io::FileCacheFactory::instance();
if (factory != nullptr) {
factory->clear_file_caches(true);

factory->_caches.clear();
factory->_path_to_cache.clear();
}

// Give background threads time to stop after cache destruction
Expand Down
Loading