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

Method DropCache

be/src/runtime/lib-cache.cc:287–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285}
286
287void LibCache::DropCache() {
288 unique_lock<mutex> lib_cache_lock(lock_);
289 for (LibMap::value_type& v: lib_cache_) {
290 bool can_delete = false;
291 {
292 // Lock to wait for any threads currently processing the entry.
293 unique_lock<mutex> entry_lock(v.second->lock);
294 v.second->should_remove = true;
295 DCHECK_GE(v.second->use_count, 0);
296 can_delete = v.second->use_count == 0;
297 }
298 VLOG(1) << "Removed lib cache entry: " << v.first;
299 if (can_delete) delete v.second;
300 }
301 lib_cache_.clear();
302}
303
304Status LibCache::GetCacheEntry(const string& hdfs_lib_file, LibType type,
305 time_t exp_mtime, unique_lock<mutex>* entry_lock, LibCacheEntry** entry) {

Callers 1

CatalogUpdateCallbackMethod · 0.80

Calls 1

clearMethod · 0.65

Tested by

no test coverage detected