-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix][broker] Closed topics won't be removed from the cache #23884
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #23884 +/- ##
============================================
+ Coverage 73.57% 74.22% +0.65%
+ Complexity 32624 32254 -370
============================================
Files 1877 1853 -24
Lines 139502 143726 +4224
Branches 15299 16333 +1034
============================================
+ Hits 102638 106685 +4047
+ Misses 28908 28640 -268
- Partials 7956 8401 +445
Flags with carried forward coverage won't be shown. Click here to find out more.
|
lhotari
left a comment
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.
Please reduce code duplication
.../org/apache/pulsar/broker/transaction/buffer/impl/SingleSnapshotAbortedTxnProcessorImpl.java
Outdated
Show resolved
Hide resolved
...st/java/org/apache/pulsar/broker/transaction/buffer/impl/TransactionPersistentTopicTest.java
Outdated
Show resolved
Hide resolved
.../org/apache/pulsar/broker/transaction/buffer/impl/SingleSnapshotAbortedTxnProcessorImpl.java
Outdated
Show resolved
Hide resolved
.../org/apache/pulsar/broker/transaction/buffer/impl/SingleSnapshotAbortedTxnProcessorImpl.java
Outdated
Show resolved
Hide resolved
.../org/apache/pulsar/broker/transaction/buffer/impl/SingleSnapshotAbortedTxnProcessorImpl.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/org/apache/pulsar/broker/transaction/buffer/impl/TopicTransactionBuffer.java
Show resolved
Hide resolved
|
hi, @lhotari @BewareMyPower @dao-jun Thanks for details review, After discussing with @poorbarcode , we've decided to pass |
85302cb to
6cdf378
Compare
|
/pulsarbot rerun-failure-checks |
RobertIndie
left a comment
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.
Overall looks good to me. Thanks.
...st/java/org/apache/pulsar/broker/transaction/buffer/impl/TransactionPersistentTopicTest.java
Outdated
Show resolved
Hide resolved
...r/src/main/java/org/apache/pulsar/broker/transaction/buffer/impl/TopicTransactionBuffer.java
Show resolved
Hide resolved
lhotari
left a comment
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.
Please check the review comments.
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java
Show resolved
Hide resolved
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java
Outdated
Show resolved
Hide resolved
lhotari
left a comment
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.
Please check comment about the comment.
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java
Show resolved
Hide resolved
lhotari
left a comment
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
(cherry picked from commit 8a40b30)
(cherry picked from commit 8a40b30)
(cherry picked from commit 8a40b30)
Motivation
When transaction component init fails, it will try to close the topic, but maybe not remove topic from cache.
createTransactionBufferSystemTopicClientcreate topicFailed to create snapshot writerand close topicModifications
removeTopicFutureFromCacheand passed topic future.removeTopicFromCache(Topic)that intrudce from [fix][broker]Consumer can't consume messages because there has two sames topics in one broker #17526Verifying this change
testNoOrphanClosedTopicIfTxnInternalFailedto reproduce this.Documentation
docdoc-requireddoc-not-neededdoc-completeTest PR
shibd#53