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

Method EvictHandlesLoop

be/src/runtime/io/handle-cache.inline.h:185–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185void FileHandleCache::EvictHandlesLoop() {
186 while (true) {
187 if (unused_handle_timeout_secs_) {
188 for (FileHandleCachePartition& p : cache_partitions_) {
189 uint64_t now = MonotonicSeconds();
190 uint64_t oldest_allowed_timestamp =
191 now > unused_handle_timeout_secs_ ? now - unused_handle_timeout_secs_ : 0;
192 p.cache.EvictOlderThan(oldest_allowed_timestamp);
193 }
194 }
195
196 // This Get() will time out until shutdown, when the promise is set.
197 bool timed_out;
198 shut_down_promise_.Get(EVICT_HANDLES_PERIOD_MS, &timed_out);
199 if (!timed_out) break;
200 }
201 // The promise must be set to true.
202 DCHECK(shut_down_promise_.IsSet());
203 DCHECK(shut_down_promise_.Get());
204}
205
206}
207}

Callers

nothing calls this directly

Calls 4

MonotonicSecondsFunction · 0.85
EvictOlderThanMethod · 0.80
GetMethod · 0.45
IsSetMethod · 0.45

Tested by

no test coverage detected