-
Notifications
You must be signed in to change notification settings - Fork 634
storage: log more info when requesting eviction #26298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a question if this should really be info
.
src/v/storage/disk_log_impl.cc
Outdated
vlog( | ||
gclog.debug, | ||
"[{}] no segments to evict up to {} offset; skipping eviction", | ||
gclog.info, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason for this upgrade to info
other than this is top of mind?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, it's purely because we see systems out there where we have a mystery and one explanation would be explained by the eviction request not happening.
the caller of this method already logs at info level. lemme see if i can just merge all these together so there is no net-new log lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nah you're right. these messages can both be at debug level. i switched them back to debug level. in all but some extreme cases they are retriggered frequently so we don't need to worry about catching all instances of these logs.
3b3299c
to
5b67530
Compare
Callers that request log eviction log the request, but there are still several conditions that must pass before the request is actually made to the eviction stm. This PR logs additional information to help debug if the request is successfully made. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
5b67530
to
1561401
Compare
CI test resultstest results on build#66644
|
/backport v25.1.x |
/backport v24.3.x |
/backport v24.2.x |
Failed to create a backport PR to v24.3.x branch. I tried:
|
Failed to create a backport PR to v24.2.x branch. I tried:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a couple naming suggestions for clarity
auto have_segments_to_evict | ||
= (_segs.size() > 1) | ||
&& _segs.front()->offsets().get_committed_offset() <= max_offset; | ||
const auto min_offset = [this]() -> std::optional<model::offset> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: IMO min_offset
is kind of confusing, given it isn't clear it's the minimum of what set this is referring to. Same with max_offset
for that matter
Maybe call it lowest_removable_offset
, and call max_offset
target_offset_to_remove
or something? If you do make this change, would be helpful to also update the log message
Callers that request log eviction log the request, but there are still several conditions that must pass before the request is actually made to the eviction stm. This PR logs additional information to help debug if the request is successfully made.
Backports Required
Release Notes