Improve performance of checkpointHighWatermarks, patch 2/2#6742
Closed
gardnervickers wants to merge 8 commits intoapache:trunkfrom
Closed
Improve performance of checkpointHighWatermarks, patch 2/2#6742gardnervickers wants to merge 8 commits intoapache:trunkfrom
gardnervickers wants to merge 8 commits intoapache:trunkfrom
Conversation
noop log4j logger to avoid warnings when benchmarking.
when constructing the parent directory path. Avoid extra copying of the in `ReplicaManager.checkpointHighWatermarks`
These include: 1. Use an object, OffsetCheckpointFileEntry constructed in ReplicaManager.checkpointHighWatermarks() to pass to the CheckpointFile. This removes the need for copying into an intermediate tuple. 2. Avoid recreating the CheckpointFile string builder between write invocations. 3. Make OffsetCheckpointFile and LeaderEpochCheckpointFile AnyVal wrappers which just reify the generic CheckpointFile. 4. Simplify the CheckpointFile.read logic, making the reading logic decoupled from the object being read.
…rvickers/kafka-1 into checkpoint-highwatermarks-alloc-2
…atermarks-alloc-2
Contributor
Author
|
retest this please |
2 similar comments
Contributor
Author
|
retest this please |
Contributor
Author
|
retest this please |
ijuma
pushed a commit
that referenced
this pull request
Feb 3, 2020
Refactors CheckpointFile such that buffers can be read in lieu of files. This is a relatively simple refactoring as we already create a buffered reader over the checkpoint file. #6742, which improves the performance of the checkpointing code, requires a similar refactoring of code, although it does go further than this. Reviewers: Colin Patrick McCabe <cmccabe@apache.org>, Ismael Juma <ismael@juma.me.uk>
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 PR builds on #6741 to improve the performance of
checkpointHighWatermarks().Commit gardnervickers/kafka-1@387fce0
This is a pretty invasive/significant refactor of the
CheckpointFilecode and accompanying classes. The goal was to avoid unnecessary buffering and allocation when constructing and writing out the checkpoint file. Also, I attempted to encourage inlining as much as possible. The change set is pretty drastic but the improvements are attractive.Improvements over gardnervickers/kafka-1@4307a73 (baseline)