[fix][broker] Closed topics won't be removed from the cache#23884
[fix][broker] Closed topics won't be removed from the cache#23884shibd merged 5 commits intoapache:masterfrom
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.
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.
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.
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.
Please check comment about the comment.
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java
Show resolved
Hide resolved
(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