-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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][txn]: fix pending ack is recovering throw CursorAlreadyClosedxception #14781
[fix][txn]: fix pending ack is recovering throw CursorAlreadyClosedxception #14781
Conversation
@@ -398,7 +398,7 @@ public Entry get() { | |||
public void readEntriesFailed(ManagedLedgerException exception, Object ctx) { | |||
if (managedLedger.getConfig().isAutoSkipNonRecoverableData() | |||
&& exception instanceof ManagedLedgerException.NonRecoverableLedgerException | |||
|| exception instanceof ManagedLedgerException.ManagedLedgerFencedException) { |
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.
Why remove the ManagedLedgerFencedException
check?
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.
And from the current implementation, if return isReadable
here which means the pending ack reply will be complete, is it expected behavior? https://github.com/apache/pulsar/pull/14781/files#diff-07a1d142ec4105cb65fac733494182b461214a68d735ae1c3f5104c3eb4f92dbL363
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.
Why remove the
ManagedLedgerFencedException
check?
we can't delete ManagedLedgerFencedException, that's my mistake
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.
And from the current implementation, if return
isReadable
here which means the pending ack reply will be complete, is it expected behavior? https://github.com/apache/pulsar/pull/14781/files#diff-07a1d142ec4105cb65fac733494182b461214a68d735ae1c3f5104c3eb4f92dbL363
if ManagedLedgerFencedException or CursorAlreadyClosedxception, the pending ack has been closed so we can stop the recover.
pulsar-broker/src/test/java/org/apache/pulsar/broker/transaction/TransactionTest.java
Outdated
Show resolved
Hide resolved
…14810) ### Motivation When Transactionlog recover fail throw CursorAlreadyClosedException, we should stop the recover op. the cursor was been closed, the transaction log was been closed, so we should stop the recover op, in order to release thread resources like #14781 ### Modifications When recover fail by CursorAlreadyClosedException, comeplete recover
…14810) ### Motivation When Transactionlog recover fail throw CursorAlreadyClosedException, we should stop the recover op. the cursor was been closed, the transaction log was been closed, so we should stop the recover op, in order to release thread resources like #14781 ### Modifications When recover fail by CursorAlreadyClosedException, comeplete recover (cherry picked from commit a14a97e)
…eption (#14781) ### Motivation When Transaction PendingAck recover fail throw CursorAlreadyClosedException, we should stop the recover op. the cursor was been closed, the pendingAck was been closed, so we should stop the recover op, in order to release thread resources ``` 02:03:00.072 [pulsar-transaction-executor-4-1] ERROR org.apache.pulsar.broker.transaction.pendingack.impl.MLPendingAckStore - MLPendingAckStore of topic [public/default/persistent/source-topic-partition-13-test__transaction_pending_ack] stat reply fail! org.apache.bookkeeper.mledger.ManagedLedgerException$CursorAlreadyClosedException: Cursor was already closed ``` ### Modifications When recover fail by CursorAlreadyClosedException, comeplete recover ### Verifying this change add test for it (cherry picked from commit 9f30ee9)
…#14807) ### Motivation When Transaction buffer recover fail throw CursorAlreadyClosedException, we should stop the recover op. the cursor was been closed, the transaction buffer was been closed, so we should stop the recover op, in order to release thread resources like #14781 (cherry picked from commit aef5f6d)
…eption (#14781) ### Motivation When Transaction PendingAck recover fail throw CursorAlreadyClosedException, we should stop the recover op. the cursor was been closed, the pendingAck was been closed, so we should stop the recover op, in order to release thread resources ``` 02:03:00.072 [pulsar-transaction-executor-4-1] ERROR org.apache.pulsar.broker.transaction.pendingack.impl.MLPendingAckStore - MLPendingAckStore of topic [public/default/persistent/source-topic-partition-13-test__transaction_pending_ack] stat reply fail! org.apache.bookkeeper.mledger.ManagedLedgerException$CursorAlreadyClosedException: Cursor was already closed ``` ### Modifications When recover fail by CursorAlreadyClosedException, comeplete recover ### Verifying this change add test for it (cherry picked from commit 9f30ee9)
…14810) ### Motivation When Transactionlog recover fail throw CursorAlreadyClosedException, we should stop the recover op. the cursor was been closed, the transaction log was been closed, so we should stop the recover op, in order to release thread resources like #14781 ### Modifications When recover fail by CursorAlreadyClosedException, comeplete recover (cherry picked from commit a14a97e)
…#14807) ### Motivation When Transaction buffer recover fail throw CursorAlreadyClosedException, we should stop the recover op. the cursor was been closed, the transaction buffer was been closed, so we should stop the recover op, in order to release thread resources like #14781 (cherry picked from commit aef5f6d)
…eption (apache#14781) ### Motivation When Transaction PendingAck recover fail throw CursorAlreadyClosedException, we should stop the recover op. the cursor was been closed, the pendingAck was been closed, so we should stop the recover op, in order to release thread resources ``` 02:03:00.072 [pulsar-transaction-executor-4-1] ERROR org.apache.pulsar.broker.transaction.pendingack.impl.MLPendingAckStore - MLPendingAckStore of topic [public/default/persistent/source-topic-partition-13-test__transaction_pending_ack] stat reply fail! org.apache.bookkeeper.mledger.ManagedLedgerException$CursorAlreadyClosedException: Cursor was already closed ``` ### Modifications When recover fail by CursorAlreadyClosedException, comeplete recover ### Verifying this change add test for it
…pache#14810) ### Motivation When Transactionlog recover fail throw CursorAlreadyClosedException, we should stop the recover op. the cursor was been closed, the transaction log was been closed, so we should stop the recover op, in order to release thread resources like apache#14781 ### Modifications When recover fail by CursorAlreadyClosedException, comeplete recover
…apache#14807) ### Motivation When Transaction buffer recover fail throw CursorAlreadyClosedException, we should stop the recover op. the cursor was been closed, the transaction buffer was been closed, so we should stop the recover op, in order to release thread resources like apache#14781
Motivation
When Transaction PendingAck recover fail throw CursorAlreadyClosedException, we should stop the recover op. the cursor was been closed, the pendingAck was been closed, so we should stop the recover op, in order to release thread resources
Modifications
When recover fail by CursorAlreadyClosedException, comeplete recover
Verifying this change
add test for it
Does this pull request potentially affect one of the following parts:
If
yes
was chosen, please highlight the changesDocumentation