KAFKA-10141: Add more detail to log segment delete messages#8850
KAFKA-10141: Add more detail to log segment delete messages#8850hachikuji merged 6 commits intoapache:trunkfrom
Conversation
hachikuji
left a comment
There was a problem hiding this comment.
Thanks for the quick patch. Left some small suggestions.
|
ok to test |
3dafa01 to
650a3b4
Compare
|
Thanks for the review @hachikuji, just updated the PR addressing your comments. The PR is ready for a review whenever you are. |
hachikuji
left a comment
There was a problem hiding this comment.
Thanks, just a couple more small comments.
650a3b4 to
fe2b94b
Compare
|
Thanks for the reviews @hachikuji. I updated the PR per your suggestions and left some follow up comments for clarification. Whenever you're ready, the PR is ready for another review. |
311b1ad to
390cefb
Compare
390cefb to
51dd8d0
Compare
|
Thanks for the comments @hachikuji. I've addressed all of your feedback, ready for another look whenever you are. |
hachikuji
left a comment
There was a problem hiding this comment.
LGTM overall. Just one more nitpick.
51dd8d0 to
44fcc4b
Compare
|
Thanks @hachikuji, addressed the comment. |
|
retest this please |
2 similar comments
|
retest this please |
|
retest this please |
|
retest this please |
2 similar comments
|
retest this please |
|
retest this please |
There was a problem hiding this comment.
Very useful to have the additional information in the logs. It's a bit weird to log these messages when the predicate is executed though (predicates should generally be side effect free). I wonder if this would be more idiomatic if we replaced the predicate with a function that returned Option[String]. None means it's not deletable and Some means it's deletable and the String is the reason. Thoughts?
|
I guess a downside is that we would always generate the string even if logging was only at the warn level. |
* 'trunk' of github.com:apache/kafka: KAFKA-10168: fix StreamsConfig parameter name variable (apache#8865) MINOR: code cleanup for inconsistent naming (apache#8871) KAFKA-10138: Prefer --bootstrap-server for reassign_partitions command in ducktape tests (apache#8898) KAFKA-10185: Restoration info logging (apache#8896) KAFKA-9891: add integration tests for EOS and StandbyTask (apache#8890) MINOR: Reduce build time by gating test coverage plugins behind a flag (apache#8899) KAFKA-10141; Add more detail to log segment delete messages (apache#8850) KAFKA-10113; Specify fetch offsets correctly in `LogTruncationException` (apache#8822) KAFKA-10167: use the admin client to read end-offset (apache#8876) MINOR: Upgrade ducktape to 0.7.8 (apache#8879) KAFKA-10123; Fix incorrect value for AWAIT_RESET#hasPosition (apache#8841) KAFKA-9896: fix flaky StandbyTaskEOSIntegrationTest (apache#8883) MINOR: clean up unused checkstyle suppressions for Streams (apache#8861) MINOR: reuse toConfigObject(Map) to generate Config (apache#8889) MINOR: Upgrade jetty to 9.4.27.v20200227 and jersey to 2.31 (apache#8859) MINOR: Fix flaky HighAvailabilityTaskAssignorIntegrationTest (apache#8884) KAFKA-10147 MockAdminClient#describeConfigs(Collection<ConfigResource>) is unable to handle broker resource (apache#8853) KAFKA-10165: Remove Percentiles from e2e metrics (apache#8882) # Conflicts: # core/src/main/scala/kafka/log/Log.scala
|
I attempted to improve the logging further. This also removes the side effect of logging as part of evaluating the predicate. #9110 |
As specified in https://issues.apache.org/jira/browse/KAFKA-10141, it would be helpful to include as much information as possible when deleting log segments. This patch introduces log messages that give more specific details as to why the log segment was deleted and the specific metadata regarding that log segment.
More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.
Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.
Committer Checklist (excluded from commit message)