[fix][txn] Fix PendingAckHandleImpl when pendingAckStoreProvider.checkInitializedBefore failed#18859
Conversation
|
@tjiuming Please add the following content to your PR description and select a checkbox: |
There was a problem hiding this comment.
Good catch! when PendingAckHandle recovery fails, it will not recover again, the consumer still can't connect to the broker. we should find out a way to solve this problem, if recovery fails, remove the subscription from PersistentTopic, and consumer connect again will reinit this sub.
Yes, it does a problem. |
Codecov Report
@@ Coverage Diff @@
## master #18859 +/- ##
============================================
+ Coverage 47.92% 47.93% +0.01%
- Complexity 10679 10688 +9
============================================
Files 703 703
Lines 68831 68856 +25
Branches 7378 7382 +4
============================================
+ Hits 32988 33009 +21
- Misses 32119 32177 +58
+ Partials 3724 3670 -54
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…ckInitializedBefore` failed (#18859)
…ckInitializedBefore` failed (apache#18859)
…ckInitializedBefore` failed (apache#18859)
…ckInitializedBefore` failed (apache#18859) (cherry picked from commit 1be5a69) (cherry picked from commit e5dedfe)
…ckInitializedBefore` failed (apache#18859)
…ckInitializedBefore` failed (apache#18859) (cherry picked from commit 1be5a69) (cherry picked from commit e5dedfe)
Motivation
When initialize PendingAckHandleImpl, it will call
And
pendingAckStoreProvider.checkInitializedBefore(persistentSubscription)will callMetadataStore#asyncExists(String ledgerName)If MetadataStore no available at that time, it may returns an exception.
If we don't handle the exception when call
the PendingAckHandleImpl cannot completed.
addConsumer will always block, the Consumer created in PersistentTopic will never close and finished.
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: tjiuming#14