File tree Expand file tree Collapse file tree
datafusion/execution/src/cache Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ impl DefaultFileStatisticsCache {
6464 }
6565}
6666
67- pub struct DefaultFileStatisticsCacheState {
67+ struct DefaultFileStatisticsCacheState {
6868 lru_queue : LruQueue < Path , CachedFileMetadata > ,
6969 memory_limit : usize ,
7070 memory_used : usize ,
@@ -152,10 +152,17 @@ impl DefaultFileStatisticsCacheState {
152152 self . memory_used -= removed. 1 . heap_size ( ) ;
153153 } else {
154154 // cache is empty while memory_used > memory_limit, cannot happen
155+ log:: error!(
156+ "File statistics cache memory accounting bug: memory_used={} but cache is empty. \
157+ Please report this to the Apache DataFusion developers.",
158+ self . memory_used
159+ ) ;
155160 debug_assert ! (
156161 false ,
157- "This is a bug! Please report it to the Apache DataFusion developers"
162+ "memory_used={} but cache is empty" ,
163+ self . memory_used
158164 ) ;
165+ self . memory_used = 0 ;
159166 return ;
160167 }
161168 }
You can’t perform that action at this time.
0 commit comments