Skip to content

[fix][txn] transaction pending ack store future not completely problem - #18943

Merged
congbobo184 merged 2 commits into
apache:masterfrom
congbobo184:congbo/fix/transaction/pending_ack_future_not_complete
Dec 16, 2022
Merged

congbobo184 merged 2 commits into
apache:masterfrom
congbobo184:congbo/fix/transaction/pending_ack_future_not_complete

Conversation

@congbobo184

Copy link
Copy Markdown
Contributor

Motivation

when MLPendingAckStoreProvider init PendingAckStore gets the ManagedLedger config throw exception, we don't handle the exception. and the pendingAckStoreFeture can't be complete, topic unload will use this future to close the pendingAck.

originPersistentTopic.getBrokerService()
.getManagedLedgerConfig(topicName).thenAccept(config -> {

Modifications

when getting managedledger config to fail, pendingAckStoreFeture will completeExceptionally();

when pendingAckStore init fail, close pendingAckHandle success directly

Verifying this change

mock get managedLeger config throw exception, then unload can success

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • transaction

Documentation

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

Matching PR in forked repository

congbobo184#12

@nicoloboschi nicoloboschi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@poorbarcode poorbarcode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov-commenter

codecov-commenter commented Dec 16, 2022 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 43.33333% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.82%. Comparing base (050b310) to head (a92efa3).
⚠️ Report is 3123 commits behind head on master.

Files with missing lines Patch % Lines
...nsaction/pendingack/impl/PendingAckHandleImpl.java 52.63% 7 Missing and 2 partials ⚠️
...ion/pendingack/impl/MLPendingAckStoreProvider.java 20.00% 8 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #18943      +/-   ##
============================================
- Coverage     47.35%   46.82%   -0.53%     
- Complexity     9384    10522    +1138     
============================================
  Files           623      703      +80     
  Lines         59104    68873    +9769     
  Branches       6146     7383    +1237     
============================================
+ Hits          27987    32251    +4264     
- Misses        28100    33018    +4918     
- Partials       3017     3604     +587     
Flag Coverage Δ
unittests 46.82% <43.33%> (-0.53%) ⬇️

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

Files with missing lines Coverage Δ
...ker/service/persistent/PersistentSubscription.java 68.76% <100.00%> (+0.80%) ⬆️
...tion/pendingack/impl/PendingAckHandleDisabled.java 31.25% <ø> (ø)
...ion/pendingack/impl/MLPendingAckStoreProvider.java 68.47% <20.00%> (-1.53%) ⬇️
...nsaction/pendingack/impl/PendingAckHandleImpl.java 51.42% <52.63%> (-0.31%) ⬇️

... and 120 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@congbobo184
congbobo184 merged commit 1d9956c into apache:master Dec 16, 2022
congbobo184 added a commit that referenced this pull request Dec 16, 2022
#18943)

when `MLPendingAckStoreProvider` init PendingAckStore gets the ManagedLedger config throw exception, we don't handle the exception. and the `pendingAckStoreFeture` can't be complete, topic unload will use this future to close the pendingAck.
https://github.com/apache/pulsar/blob/3011946a5c3b64ed7c08b6bfb1f6492f8aaaca9c/pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/pendingack/impl/MLPendingAckStoreProvider.java#L114-L115
when getting managedledger config to fail, `pendingAckStoreFeture` will `completeExceptionally()`;

when pendingAckStore init fail, close pendingAckHandle success directly

mock get managedLeger config throw exception, then unload can success

(cherry picked from commit 1d9956c)
@congbobo184 congbobo184 added the cherry-picked/branch-2.9 Archived: 2.9 is end of life label Dec 16, 2022
congbobo184 added a commit that referenced this pull request Dec 16, 2022
#18943)

when `MLPendingAckStoreProvider` init PendingAckStore gets the ManagedLedger config throw exception, we don't handle the exception. and the `pendingAckStoreFeture` can't be complete, topic unload will use this future to close the pendingAck.
https://github.com/apache/pulsar/blob/3011946a5c3b64ed7c08b6bfb1f6492f8aaaca9c/pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/pendingack/impl/MLPendingAckStoreProvider.java#L114-L115
when getting managedledger config to fail, `pendingAckStoreFeture` will `completeExceptionally()`;

when pendingAckStore init fail, close pendingAckHandle success directly

mock get managedLeger config throw exception, then unload can success

(cherry picked from commit 1d9956c)
congbobo184 added a commit that referenced this pull request Dec 16, 2022
#18943)

when `MLPendingAckStoreProvider` init PendingAckStore gets the ManagedLedger config throw exception, we don't handle the exception. and the `pendingAckStoreFeture` can't be complete, topic unload will use this future to close the pendingAck.
https://github.com/apache/pulsar/blob/3011946a5c3b64ed7c08b6bfb1f6492f8aaaca9c/pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/pendingack/impl/MLPendingAckStoreProvider.java#L114-L115
when getting managedledger config to fail, `pendingAckStoreFeture` will `completeExceptionally()`;

when pendingAckStore init fail, close pendingAckHandle success directly

mock get managedLeger config throw exception, then unload can success

(cherry picked from commit 1d9956c)
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Jan 10, 2023
apache#18943)

when `MLPendingAckStoreProvider` init PendingAckStore gets the ManagedLedger config throw exception, we don't handle the exception. and the `pendingAckStoreFeture` can't be complete, topic unload will use this future to close the pendingAck.
https://github.com/apache/pulsar/blob/3011946a5c3b64ed7c08b6bfb1f6492f8aaaca9c/pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/pendingack/impl/MLPendingAckStoreProvider.java#L114-L115
when getting managedledger config to fail, `pendingAckStoreFeture` will `completeExceptionally()`;

when pendingAckStore init fail, close pendingAckHandle success directly

mock get managedLeger config throw exception, then unload can success

(cherry picked from commit 1d9956c)
(cherry picked from commit 64257a7)
lifepuzzlefun pushed a commit to lifepuzzlefun/pulsar that referenced this pull request Jan 10, 2023
apache#18943)

### Motivation

when `MLPendingAckStoreProvider` init PendingAckStore gets the ManagedLedger config throw exception, we don't handle the exception. and the `pendingAckStoreFeture` can't be complete, topic unload will use this future to close the pendingAck.
https://github.com/apache/pulsar/blob/3011946a5c3b64ed7c08b6bfb1f6492f8aaaca9c/pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/pendingack/impl/MLPendingAckStoreProvider.java#L114-L115
### Modifications
when getting managedledger config to fail, `pendingAckStoreFeture` will `completeExceptionally()`;

when pendingAckStore init fail, close pendingAckHandle success directly


### Verifying this change
mock get managedLeger config throw exception, then unload can success
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Jan 11, 2023
apache#18943)

when `MLPendingAckStoreProvider` init PendingAckStore gets the ManagedLedger config throw exception, we don't handle the exception. and the `pendingAckStoreFeture` can't be complete, topic unload will use this future to close the pendingAck.
https://github.com/apache/pulsar/blob/3011946a5c3b64ed7c08b6bfb1f6492f8aaaca9c/pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/pendingack/impl/MLPendingAckStoreProvider.java#L114-L115
when getting managedledger config to fail, `pendingAckStoreFeture` will `completeExceptionally()`;

when pendingAckStore init fail, close pendingAckHandle success directly

mock get managedLeger config throw exception, then unload can success

(cherry picked from commit 1d9956c)
(cherry picked from commit 64257a7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants