-
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
[fix] [broker] Delete topic timeout due to NPE #21595
[fix] [broker] Delete topic timeout due to NPE #21595
Conversation
@@ -35,6 +37,7 @@ | |||
import org.apache.pulsar.broker.service.persistent.PersistentDispatcherMultipleConsumers; | |||
import org.apache.pulsar.common.util.FutureUtil; | |||
|
|||
@Slf4j |
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.
Not necessary change.
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.
Removed
@@ -85,6 +88,9 @@ public DelayedDeliveryTracker newTracker(PersistentDispatcherMultipleConsumers d | |||
*/ | |||
public CompletableFuture<Void> cleanResidualSnapshots(ManagedCursor cursor) { | |||
Map<String, String> cursorProperties = cursor.getCursorProperties(); | |||
if (MapUtils.isEmpty(cursorProperties)) { |
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.
I wonder which place introduce the null
cursorProperties. And if so, should all the place check cursorProperties
is empty or not:)?
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.
I wonder which place introduce the null cursorProperties. And if so, should all the place check cursorProperties is empty or not:)?
Good suggestion. Fixed
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #21595 +/- ##
============================================
- Coverage 73.27% 73.26% -0.02%
- Complexity 32694 32703 +9
============================================
Files 1892 1892
Lines 140707 140682 -25
Branches 15483 15493 +10
============================================
- Hits 103098 103065 -33
- Misses 29496 29508 +12
+ Partials 8113 8109 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
### Issue: There is an NPE that causes the Future of Delay message indexes bucket deletion to be no longer complete, which leads to the topic deletion timeout. You can reproduce this issue by the test `testDeletePartitionedTopicIfCursorPropsEmpty` and `testDeleteTopicIfCursorPropsEmpty` ### Modifications Fix the NPE. (cherry picked from commit b2f2b53)
### Issue: There is an NPE that causes the Future of Delay message indexes bucket deletion to be no longer complete, which leads to the topic deletion timeout. You can reproduce this issue by the test `testDeletePartitionedTopicIfCursorPropsEmpty` and `testDeleteTopicIfCursorPropsEmpty` ### Modifications Fix the NPE. (cherry picked from commit b2f2b53)
### Issue: There is an NPE that causes the Future of Delay message indexes bucket deletion to be no longer complete, which leads to the topic deletion timeout. You can reproduce this issue by the test `testDeletePartitionedTopicIfCursorPropsEmpty` and `testDeleteTopicIfCursorPropsEmpty` ### Modifications Fix the NPE. (cherry picked from commit b2f2b53)
### Issue: There is an NPE that causes the Future of Delay message indexes bucket deletion to be no longer complete, which leads to the topic deletion timeout. You can reproduce this issue by the test `testDeletePartitionedTopicIfCursorPropsEmpty` and `testDeleteTopicIfCursorPropsEmpty` ### Modifications Fix the NPE. (cherry picked from commit b2f2b53)
Motivation
Background:
BucketDelayedDeliveryTrackerFactory
was added with PIP-195: New bucket based delayed message trackerBucketDelayedDeliveryTrackerFactory
will be initialized if setting configsetDelayedDeliveryTrackerFactoryClassName
toBucketDelayedDeliveryTrackerFactory
Issue:
There is an NPE that causes the Future of Delay message indexes bucket deletion to be no longer complete, which leads to the topic deletion timeout. You can reproduce this issue by the test
testDeletePartitionedTopicIfCursorPropsEmpty
andtestDeleteTopicIfCursorPropsEmpty
Issue logs:
Modifications
Fix the NPE.
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: x