You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Restarted my dev node with some of the changes in master and saw this line come up.
{"@timestamp":"2024-10-18T05:20:37,165","level":"INFO","thread":"main","class":"StorageService","message":"State pruner will run every: 5 minute(s), retaining states for the last 0 finalized slots. Limited to 1 state prune per execution.","throwable":""}
I think we're enabling the state pruner even when we're running on minimal mode, which doesn't make much sense since we don't even store more than 1 finalized states in that mode.
We can probably run some checks and find a way to not enable the state pruner when it's not needed.
I believe that was introduced intentionally for the use case where users migrate from Archive->Minimal but minimal->minimal won't benefit from this at all.
The text was updated successfully, but these errors were encountered:
gfukushima
changed the title
State pruner running even when we're on minimal mode
State pruner running even when on minimal mode
Oct 18, 2024
Current master behavior sounds good for me. It doesn't use any resources, it's something like 5ms/1 thread job. If there is something to cleanup, it will clean it up, if nothing, ok, go further, it's cheap.
There is no simple way to check whether we were using any other DB modes before and if there is something to cleanup other than trying to do the job. The only optimization possible here is to check on first run if there is something to cleanup, if nothing and the mode is MINIMAL, stop scheduling next pruner jobs, but I'd prefer simplicity over complexity as long as running this job is very cheap.
we're pruning to cleanup states that may have been left around from a previous Archive mode, so we want to be careful here
Even Minimal -> minimal is possible we've got left overs from an earlier archive mode, we'd need to detect there's no archive states and shut it down, or have the pruner shut down once its done, or something. or just let it run and see there's nothing...
Restarted my dev node with some of the changes in master and saw this line come up.
{"@timestamp":"2024-10-18T05:20:37,165","level":"INFO","thread":"main","class":"StorageService","message":"State pruner will run every: 5 minute(s), retaining states for the last 0 finalized slots. Limited to 1 state prune per execution.","throwable":""}
I think we're enabling the state pruner even when we're running on minimal mode, which doesn't make much sense since we don't even store more than 1 finalized states in that mode.
We can probably run some checks and find a way to not enable the state pruner when it's not needed.
I believe that was introduced intentionally for the use case where users migrate from Archive->Minimal but minimal->minimal won't benefit from this at all.
The text was updated successfully, but these errors were encountered: