Skip to content
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] Let Pending ack handler can retry to init when encounters a metadata store error #23153

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

poorbarcode
Copy link
Contributor

Motivation

The Pending Ack handler can not recover after encountering a MetadataStoreException even the metadata store has been re-established.

2024-07-24T02:56:11,347+0000 [pulsar-transaction-executor-5-1] ERROR org.apache.pulsar.broker.transaction.pendingack.impl.PendingAckHandleImpl - [persistent://{tenant}/{ns}/{topic}] [multiTopicsReader-5c010a1ec8] PendingAckHandleImpl init fail!
org.apache.pulsar.metadata.api.MetadataStoreException: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /managed-ledgers/{tenant}/{namespace}/persistent/{topic}-multiTopicsReader-5c010a1ec8__transaction_pending_ack
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[io.netty-netty-common-4.1.108.Final.jar:4.1.108.Final]
	at org.apache.zookeeper.KeeperException.create(KeeperException.java:101)
	at org.apache.pulsar.broker.transaction.pendingack.impl.PendingAckHandleImpl.lambda$init$1(PendingAckHandleImpl.java:185) ~[io.streamnative-pulsar-broker-3.0.4.6.jar:3.0.4.6]
        ...

Modifications

Add MetadataStoreException and BKException into the retriable error list

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: x

@poorbarcode poorbarcode added category/reliability The function does not work properly in certain specific environments or failures. e.g. data lost release/3.2.5 release/3.0.7 release/3.3.2 labels Aug 12, 2024
@poorbarcode poorbarcode added this to the 3.4.0 milestone Aug 12, 2024
@poorbarcode poorbarcode self-assigned this Aug 12, 2024
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Aug 12, 2024
@poorbarcode
Copy link
Contributor Author

/pulsarbot rerun-failure-checks

@poorbarcode poorbarcode changed the title [fix] [broker] Let Pending ack handler can retry when encounters a metadata store error [fix] [broker] Let Pending ack handler can retry to init when encounters a metadata store error Aug 12, 2024
@codecov-commenter
Copy link

codecov-commenter commented Aug 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.56%. Comparing base (bbc6224) to head (08f0209).
Report is 780 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23153      +/-   ##
============================================
+ Coverage     73.57%   74.56%   +0.98%     
- Complexity    32624    33603     +979     
============================================
  Files          1877     1919      +42     
  Lines        139502   144268    +4766     
  Branches      15299    15777     +478     
============================================
+ Hits         102638   107570    +4932     
+ Misses        28908    28458     -450     
- Partials       7956     8240     +284     
Flag Coverage Δ
inttests 27.90% <ø> (+3.32%) ⬆️
systests 24.73% <ø> (+0.41%) ⬆️
unittests 73.91% <ø> (+1.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...nsaction/pendingack/impl/PendingAckHandleImpl.java 72.97% <ø> (+2.12%) ⬆️

... and 504 files with indirect coverage changes

@lhotari lhotari merged commit 2dde403 into apache:master Aug 12, 2024
62 of 63 checks passed
Technoboy- pushed a commit that referenced this pull request Aug 14, 2024
lhotari pushed a commit that referenced this pull request Aug 14, 2024
…ers a metadata store error (#23153)

(cherry picked from commit 2dde403)
poorbarcode added a commit that referenced this pull request Aug 15, 2024
…ers a metadata store error (#23153)

(cherry picked from commit 2dde403)
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Aug 16, 2024
…ers a metadata store error (apache#23153)

(cherry picked from commit 2dde403)
(cherry picked from commit d406193)
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Aug 16, 2024
…ers a metadata store error (apache#23153)

(cherry picked from commit 2dde403)
(cherry picked from commit d406193)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Aug 20, 2024
…ers a metadata store error (apache#23153)

(cherry picked from commit 2dde403)
(cherry picked from commit d406193)
grssam pushed a commit to grssam/pulsar that referenced this pull request Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category/reliability The function does not work properly in certain specific environments or failures. e.g. data lost cherry-picked/branch-3.0 cherry-picked/branch-3.2 cherry-picked/branch-3.3 doc-not-needed Your PR changes do not impact docs ready-to-test release/3.0.7 release/3.2.5 release/3.3.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants