From 298e2819daf8254c09a5b3b5407401d9163ccb6d Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Fri, 13 Mar 2026 14:58:10 +0800 Subject: [PATCH] triedb/pathdb: polish --- triedb/pathdb/history_index_pruner.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/triedb/pathdb/history_index_pruner.go b/triedb/pathdb/history_index_pruner.go index e6dabaf89d..c966cefae1 100644 --- a/triedb/pathdb/history_index_pruner.go +++ b/triedb/pathdb/history_index_pruner.go @@ -34,11 +34,11 @@ const ( // index pruning too frequently. indexPruningThreshold = 90000 - // indexPruneReopenInterval is how long the iterator is kept open before + // iteratorReopenInterval is how long the iterator is kept open before // being released and re-opened. Long-lived iterators hold a read snapshot // that blocks LSM compaction; periodically re-opening avoids stalling the // compactor during a large scan. - indexPruneReopenInterval = 3 * time.Minute + iteratorReopenInterval = 3 * time.Minute ) // indexPruner is responsible for pruning stale index data from the tail side @@ -214,7 +214,7 @@ func (p *indexPruner) prunePrefix(prefix []byte, elemType elementType, tail uint } // Periodically release the iterator so the LSM compactor // is not blocked by the read snapshot we hold. - if time.Since(opened) >= indexPruneReopenInterval { + if time.Since(opened) >= iteratorReopenInterval { reopen = true start = common.CopyBytes(key[len(prefix):]) break