-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[compaction] Filter out invalid splits to improve flink database compaction efficiency #3233
Conversation
b580c76
to
0ed2e7b
Compare
3165576
to
367df6e
Compare
CommitMessageImpl commitMessage = | ||
(CommitMessageImpl) | ||
committable.wrappedCommittable(); | ||
return !commitMessage.compactIncrement().isEmpty(); |
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.
just use CommitMessageImpl.isEmpty
?
349d421
to
6c75f2c
Compare
52284e5
to
4ae3dce
Compare
} | ||
return dataSplit.dataFiles().stream() | ||
.map(DataFileMeta::level) | ||
.anyMatch(level -> level != maxLevel); |
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.
Why filter maxLevel?
.filter( | ||
split -> { | ||
DataSplit dataSplit = (DataSplit) split; | ||
if (dataSplit.dataFiles().isEmpty()) { |
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.
Why not care before files?
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.
@zhourui999 I cannot get how this optimization works...
Purpose
Linked issue: close #xxx
Filter out invalid splits to improve flink database compaction efficiency
(1) Referring to the pickFullComparison method of CompactStrategy, filter out whether dataFiles is empty or all files in dataFiles are at the max-level
Tests
API and Format
Documentation