reth icon indicating copy to clipboard operation
reth copied to clipboard

fix(prune): respect timeout in account and storage history pruning

Open dennsikl opened this issue 1 week ago • 0 comments
trafficstars

Fixes #19685 #19682

Added timeout checking to prune_history_indices function by passing PruneLimiter and checking is_time_limit_reached() in both the outer and inner loops. The function now returns a tuple (PrunedIndices, bool) to indicate completion status, allowing the pruner to resume from checkpoint on the next run when interrupted by timeout.

This prevents the pruner from holding locks for 800ms-2s and ensures the configured timeout is respected as a hard limit rather than a soft limit.

dennsikl avatar Nov 13 '25 08:11 dennsikl