mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix(cli): remove static file providers from cache on reth db stats (#10887)
This commit is contained in:
@ -249,6 +249,12 @@ impl Command {
|
||||
total_index_size += index_size;
|
||||
total_offsets_size += offsets_size;
|
||||
total_config_size += config_size;
|
||||
|
||||
// Manually drop provider, otherwise removal from cache will deadlock.
|
||||
drop(jar_provider);
|
||||
|
||||
// Removes from cache, since if we have many files, it may hit ulimit limits
|
||||
static_file_provider.remove_cached_provider(segment, fixed_block_range.end());
|
||||
}
|
||||
|
||||
if !self.detailed_segments {
|
||||
|
||||
@ -358,6 +358,8 @@ impl StaticFileProvider {
|
||||
}
|
||||
|
||||
/// Given a segment and block range it removes the cached provider from the map.
|
||||
///
|
||||
/// CAUTION: cached provider should be dropped before calling this or IT WILL deadlock.
|
||||
pub fn remove_cached_provider(
|
||||
&self,
|
||||
segment: StaticFileSegment,
|
||||
|
||||
Reference in New Issue
Block a user