MINOR: Improve logging around index files. - #6385
Merged
Merged
Conversation
This patch adds additional DEBUG statements in AbstractIndex.scala, OffsetIndex.scala, and TimeIndex.scala. It also changes the logging on append from DEBUG to TRACE to amake DEBUG logging less disruptive.
hachikuji
reviewed
Mar 15, 2019
hachikuji
left a comment
Contributor
There was a problem hiding this comment.
Thanks, makes sense. Left a minor nitpick.
| _entries = entries | ||
| mmap.position(_entries * entrySize) | ||
| _lastOffset = lastEntry.offset | ||
| debug(s"Truncated index ${file.getAbsolutePath} to $entries entries; position is now ${mmap.position()} and last offset is now ${_lastOffset}") |
Contributor
There was a problem hiding this comment.
nit: we're a little inconsistent on use of file.getName vs file.getAbsolutePath. Also, it would be nice to consistently favor the use of ${} substitutions over format.
Contributor
Author
There was a problem hiding this comment.
Went with file.getAbsolutePath in order to identify the partition, since we don't have a LogContext. Also replaced format with substitutions
hachikuji
approved these changes
Mar 19, 2019
hachikuji
left a comment
Contributor
There was a problem hiding this comment.
LGTM, just one minor comment.
| lastOffset.foreach { offset => | ||
| if (offset >= abortedTxn.lastOffset) | ||
| throw new IllegalArgumentException("The last offset of appended transactions must increase sequentially") | ||
| throw new IllegalArgumentException(s"The last offset of appended transactions must increase sequentially (${file.getAbsolutePath})") |
Contributor
There was a problem hiding this comment.
Can you add the offsets above to this message?
hachikuji
pushed a commit
that referenced
this pull request
Mar 19, 2019
This patch adds additional DEBUG statements in AbstractIndex.scala, OffsetIndex.scala, and TimeIndex.scala. It also changes the logging on append from DEBUG to TRACE to make DEBUG logging less disruptive, and it ensures that exceptions raised from index classes include file/offset information. Reviewers: Jason Gustafson <jason@confluent.io>
hachikuji
pushed a commit
that referenced
this pull request
Mar 19, 2019
This patch adds additional DEBUG statements in AbstractIndex.scala, OffsetIndex.scala, and TimeIndex.scala. It also changes the logging on append from DEBUG to TRACE to make DEBUG logging less disruptive, and it ensures that exceptions raised from index classes include file/offset information. Reviewers: Jason Gustafson <jason@confluent.io>
hachikuji
pushed a commit
that referenced
this pull request
Mar 19, 2019
This patch adds additional DEBUG statements in AbstractIndex.scala, OffsetIndex.scala, and TimeIndex.scala. It also changes the logging on append from DEBUG to TRACE to make DEBUG logging less disruptive, and it ensures that exceptions raised from index classes include file/offset information. Reviewers: Jason Gustafson <jason@confluent.io>
hachikuji
pushed a commit
that referenced
this pull request
Mar 19, 2019
This patch adds additional DEBUG statements in AbstractIndex.scala, OffsetIndex.scala, and TimeIndex.scala. It also changes the logging on append from DEBUG to TRACE to make DEBUG logging less disruptive, and it ensures that exceptions raised from index classes include file/offset information. Reviewers: Jason Gustafson <jason@confluent.io>
jarekr
pushed a commit
to confluentinc/kafka
that referenced
this pull request
Apr 18, 2019
* apache/trunk: MINOR: Improve logging around index files (apache#6385) KAFKA-7858: Automatically generate JoinGroup request/response KAFKA-8121; Shutdown ZK client expiry handler earlier during close (apache#6462) MINOR: Improve verification in flaky testPartitionReassignmentDuringDeleteTopic (apache#6460)
pengxiaolong
pushed a commit
to pengxiaolong/kafka
that referenced
this pull request
Jun 14, 2019
This patch adds additional DEBUG statements in AbstractIndex.scala, OffsetIndex.scala, and TimeIndex.scala. It also changes the logging on append from DEBUG to TRACE to make DEBUG logging less disruptive, and it ensures that exceptions raised from index classes include file/offset information. Reviewers: Jason Gustafson <jason@confluent.io>
3 tasks
efeg
added a commit
to linkedin/kafka
that referenced
this pull request
Dec 19, 2019
…cessary resource use during index operations. (#64) TICKET = LI_DESCRIPTION = PR apache#6385 has added several debug and trace statements in AbstractIndex.scala, OffsetIndex.scala, and TimeIndex.scala. However, not guarding these logging statements yields waste of resources during index operations. This patch adds log guarding to avoid this resource waste. EXIT_CRITERIA = MANUAL [""]
gitlw
pushed a commit
to linkedin/kafka
that referenced
this pull request
May 30, 2020
…cessary resource use during index operations. (#64) TICKET = LI_DESCRIPTION = PR apache#6385 has added several debug and trace statements in AbstractIndex.scala, OffsetIndex.scala, and TimeIndex.scala. However, not guarding these logging statements yields waste of resources during index operations. This patch adds log guarding to avoid this resource waste. EXIT_CRITERIA = MANUAL [""]
gitlw
pushed a commit
to linkedin/kafka
that referenced
this pull request
Jun 12, 2020
…cessary resource use during index operations. (#64) TICKET = LI_DESCRIPTION = PR apache#6385 has added several debug and trace statements in AbstractIndex.scala, OffsetIndex.scala, and TimeIndex.scala. However, not guarding these logging statements yields waste of resources during index operations. This patch adds log guarding to avoid this resource waste. EXIT_CRITERIA = MANUAL [""]
gitlw
pushed a commit
to linkedin/kafka
that referenced
this pull request
Jun 13, 2020
…cessary resource use during index operations. (#64) TICKET = LI_DESCRIPTION = PR apache#6385 has added several debug and trace statements in AbstractIndex.scala, OffsetIndex.scala, and TimeIndex.scala. However, not guarding these logging statements yields waste of resources during index operations. This patch adds log guarding to avoid this resource waste. EXIT_CRITERIA = MANUAL [""]
lmr3796
pushed a commit
to lmr3796/kafka
that referenced
this pull request
Feb 9, 2022
…cessary resource use during index operations (linkedin#64) TICKET = LI_DESCRIPTION = PR apache#6385 has added several debug and trace statements in AbstractIndex.scala, OffsetIndex.scala, and TimeIndex.scala. However, not guarding these logging statements yields waste of resources during index operations. This patch adds log guarding to avoid this resource waste. EXIT_CRITERIA = MANUAL [""]
lmr3796
pushed a commit
to lmr3796/kafka
that referenced
this pull request
Feb 9, 2022
…cessary resource use during index operations (linkedin#64) TICKET = LI_DESCRIPTION = PR apache#6385 has added several debug and trace statements in AbstractIndex.scala, OffsetIndex.scala, and TimeIndex.scala. However, not guarding these logging statements yields waste of resources during index operations. This patch adds log guarding to avoid this resource waste. EXIT_CRITERIA = MANUAL [""]
lmr3796
pushed a commit
to lmr3796/kafka
that referenced
this pull request
Mar 25, 2022
…cessary resource use during index operations (linkedin#64) TICKET = LI_DESCRIPTION = PR apache#6385 has added several debug and trace statements in AbstractIndex.scala, OffsetIndex.scala, and TimeIndex.scala. However, not guarding these logging statements yields waste of resources during index operations. This patch adds log guarding to avoid this resource waste. EXIT_CRITERIA = MANUAL [""]
lmr3796
pushed a commit
to lmr3796/kafka
that referenced
this pull request
Jun 2, 2022
…cessary resource use during index operations (linkedin#64) TICKET = LI_DESCRIPTION = PR apache#6385 has added several debug and trace statements in AbstractIndex.scala, OffsetIndex.scala, and TimeIndex.scala. However, not guarding these logging statements yields waste of resources during index operations. This patch adds log guarding to avoid this resource waste. EXIT_CRITERIA = MANUAL [""]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch adds additional DEBUG statements in AbstractIndex.scala, OffsetIndex.scala, and TimeIndex.scala. It also changes the logging on append from DEBUG to TRACE to make DEBUG logging less disruptive.
Committer Checklist (excluded from commit message)