File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
be/test/olap/rowset/segment_v2 Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -83,8 +83,12 @@ class SegmentCorruptionTest : public testing::Test {
8383 // background threads from accessing SyncPoint during/after destruction
8484 SyncPoint::get_instance ()->disable_processing ();
8585
86- if (ExecEnv::GetInstance ()->file_cache_factory () != nullptr ) {
87- io::FileCacheFactory::instance ()->clear_file_caches (true );
86+ auto * factory = io::FileCacheFactory::instance ();
87+ if (factory != nullptr ) {
88+ factory->clear_file_caches (true );
89+
90+ factory->_caches .clear ();
91+ factory->_path_to_cache .clear ();
8892 }
8993
9094 // Give background threads time to stop after cache destruction
@@ -132,8 +136,12 @@ class SegmentCorruptionTest : public testing::Test {
132136 // background threads from accessing SyncPoint during/after destruction
133137 SyncPoint::get_instance ()->disable_processing ();
134138
135- if (ExecEnv::GetInstance ()->file_cache_factory () != nullptr ) {
136- io::FileCacheFactory::instance ()->clear_file_caches (true );
139+ auto * factory = io::FileCacheFactory::instance ();
140+ if (factory != nullptr ) {
141+ factory->clear_file_caches (true );
142+
143+ factory->_caches .clear ();
144+ factory->_path_to_cache .clear ();
137145 }
138146
139147 // Give background threads time to stop after cache destruction
You can’t perform that action at this time.
0 commit comments