Skip to content

Commit 4100642

Browse files
committed
Simplify heap size accounting
1 parent e74254f commit 4100642

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

datafusion/execution/src/cache/file_statistics_cache.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,10 @@ impl DefaultFileStatisticsCacheState {
111111

112112
let old_value = self.lru_queue.put(key.clone(), value);
113113
self.memory_used += entry_size;
114+
self.memory_used += key.path.as_ref().heap_size();
114115

115116
if let Some(old_entry) = &old_value {
116117
self.memory_used -= old_entry.heap_size();
117-
} else {
118-
self.memory_used += key.path.as_ref().heap_size();
119118
}
120119

121120
self.evict_entries();

0 commit comments

Comments
 (0)