-
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][broker][PIP-195] Implement delayed message bucket snapshot recover - part5 #18420
Conversation
2ba0f47
to
b223ed4
Compare
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.
Looks generally good to me.
I just left some minor comments.
this.numberDelayedMessages = recoverBucketSnapshot(); | ||
} | ||
|
||
private long recoverBucketSnapshot() throws RuntimeException { |
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.
Is it better to add a method CompletableFuture<Void> initialize()
to the DelayedDeliveryTracker
to avoid blocking calls when creating the BucketDelayedDeliveryTracker
instance
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.
It seems that we still need to block initialize
method, when using DelayedDeliveryTrackerFactory
to create DelayedEdeliverytracker
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.
Ok, we can just keep it here for now.
int nextSegmentEntryId = nextSnapshotEntryIndex + 1; | ||
loadMetaDataFuture.complete(nextSegmentEntryId); | ||
}).exceptionally(ex -> { | ||
loadMetaDataFuture.completeExceptionally(ex); |
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.
It looks like we can simplify the logic to avoid creating the loadMetaDataFuture
.
It will make the code easy to read.
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.
It seems that he still needs loadMetaDataFuture
, but I improve the code, make the code easy to read
/pulsarbot run-failure-checks |
Codecov Report
@@ Coverage Diff @@
## master #18420 +/- ##
============================================
+ Coverage 45.61% 46.28% +0.66%
+ Complexity 10728 10445 -283
============================================
Files 752 706 -46
Lines 72521 69078 -3443
Branches 7791 7398 -393
============================================
- Hits 33083 31973 -1110
+ Misses 35769 33509 -2260
+ Partials 3669 3596 -73
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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
Master Issue: #16763
Motivation
#16763
Modifications
Implement delayed message index bucket snapshot recover
Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: coderzc#30