-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[feat] PIP-352: Event time based compaction #22517
[feat] PIP-352: Event time based compaction #22517
Conversation
@marekczajkowski Please add the following content to your PR description and select a checkbox:
|
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.
Great work @marekczajkowski . I added an initial review.
pulsar-broker/src/main/java/org/apache/pulsar/client/impl/RawBatchConverter.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/compaction/NaturalOrderTwoPhaseCompactor.java
Outdated
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/compaction/EventTimeCompactor.java
Outdated
Show resolved
Hide resolved
One of the challenges with event time order compacting is that it would require some additional configuration and logic for the acceptable time skew (late arrival of events). @marekczajkowski Any thoughts on how to solve that challenge? |
I might be overthinking this. Perhaps it doesn't matter that much. :) |
Can you explain what you mean by that ? I don't quite get it |
I think I just wasn't thinking through it. It's not a problem since the last message with the most recent event time "wins". It's eventually consistent. |
…-time-based-compaction
@marekczajkowski Do you have tests for the new behavior? How about the solution for configuring the compactor? |
I have added unit tests. As for configuring the compactor there is no new mechanism. It uses existing 'compactionServiceFactoryClassName' property name to switch the factory that creates compactor |
Thanks. The PR itself is ok. Configuring the compactor will require some updates in documentation. It would be great if our documention presents this feature, the purpose of it and shows how to enable it. I guess the minimal approach would be to add the configuration key to |
pulsar-broker/src/test/java/org/apache/pulsar/compaction/EventTimeOrderCompactorTest.java
Show resolved
Hide resolved
Sure. Both configs updated with documenting comments |
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. Good work @marekczajkowski ! Thanks for contributing!
/pulsarbot rerun-failure-checks |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #22517 +/- ##
============================================
+ Coverage 73.57% 74.53% +0.96%
- Complexity 32624 33654 +1030
============================================
Files 1877 1924 +47
Lines 139502 144548 +5046
Branches 15299 15822 +523
============================================
+ Hits 102638 107743 +5105
+ Misses 28908 28543 -365
- Partials 7956 8262 +306
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Implementation for PIP-352: Event time based topic compactor