diff --git a/storage/aptosdb/src/versioned_node_cache.rs b/storage/aptosdb/src/versioned_node_cache.rs index 8b935f1e77ab1..688614493ec17 100644 --- a/storage/aptosdb/src/versioned_node_cache.rs +++ b/storage/aptosdb/src/versioned_node_cache.rs @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use crate::{lru_node_cache::LruNodeCache, metrics::OTHER_TIMERS_SECONDS, state_merkle_db::Node}; +use aptos_experimental_runtimes::thread_manager::THREAD_MANAGER; use aptos_infallible::RwLock; use aptos_jellyfish_merkle::node_type::NodeKey; use aptos_types::transaction::Version; @@ -73,14 +74,16 @@ impl VersionedNodeCache { }; if let Some((version, cache)) = to_evict { - cache - .iter() - .collect::>() - .into_par_iter() - .with_min_len(100) - .for_each(|(node_key, node)| { - lru_cache.put(node_key.clone(), node.clone()); - }); + THREAD_MANAGER.get_non_exe_cpu_pool().install(|| { + cache + .iter() + .collect::>() + .into_par_iter() + .with_min_len(100) + .for_each(|(node_key, node)| { + lru_cache.put(node_key.clone(), node.clone()); + }); + }); let evicted = self.inner.write().pop_front(); assert_eq!(evicted, Some((version, cache)));