chore: Improved StateView and StateSnapshot lifetime logging - #2452
chore: Improved StateView and StateSnapshot lifetime logging#2452sergerad wants to merge 5 commits into
Conversation
There was a problem hiding this comment.
I'm not sure if this is where we would want to do this because there is a lack of actionable information.
What do we now do once we receive this? We need to identify which query this is, but we have no way of doing so..
Perhaps we could explore a timer within the actual snapshot itself, and each snapshot taken automatically gets the caller LoC information embedded?
There was a problem hiding this comment.
I have added a LoC WARN log on long-held StateViews (StateSnapshots are not instantiated per-query, StateViews are).
The per-block log is still important in case we ever get snapshots or views that never end.
There was a problem hiding this comment.
Those two things are essentially synonyms. We should try improve our naming here. I assume its a snapshot because rocksdb calls them snapshots? Perhaps SmtView?
Is there a downside to having just a single one, instead of separate types? I can't imagine a snapshot is expensive to hold temporarily.
Summary
Closes #2451.
Currently, if a snapshot has lasted beyond some threshold, we do a single warning log when that snapshot expires / drops. This means we might not hear about the lag promptly.
We also never report which LoC was responsible for a long-held (2s)
StateView.This PR adds
StateView::droplog that shows the LoC where theStateViewwas created, E.G.:The above output was tested with both
view()andwith_view()calls.Changelog