MCPcopy Create free account
hub / github.com/apache/impala / DeleteOldFiles

Method DeleteOldFiles

be/src/runtime/io/data-cache.cc:1035–1043  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1033}
1034
1035void DataCache::Partition::DeleteOldFiles() {
1036 std::unique_lock<SpinLock> partition_lock(lock_);
1037 if (UNLIKELY(files_readonly_)) return;
1038 DCHECK_GE(oldest_opened_file_, 0);
1039 int target = cache_files_.size() - FLAGS_data_cache_max_opened_files;
1040 while (oldest_opened_file_ < target) {
1041 cache_files_[oldest_opened_file_++]->DeleteFile();
1042 }
1043}
1044
1045void DataCache::Partition::SetCacheFilesReadOnly() {
1046 std::unique_lock<SpinLock> partition_lock(lock_);

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
DeleteFileMethod · 0.45

Tested by

no test coverage detected