-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[feature][txn] Fix individual ack batch message with transaction abort redevlier duplicate messages #14327
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
Conversation
… will redeliver Duplicate bit sit
|
@congbobo184:Thanks for your contribution. For this PR, do we need to update docs? |
|
@congbobo184:Thanks for providing doc info! |
|
The pr had no activity for 30 days, mark with Stale label. |
Jason918
left a comment
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.
LGTM
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/util/PositionAckSetUtil.java
Outdated
Show resolved
Hide resolved
…tion_individual_ack_batch_message_abort_problem
…tion_individual_ack_batch_message_abort_problem
|
The pr had no activity for 30 days, mark with Stale label. |
|
@congbobo184 Should we close this PR? |
|
@Jason918 don't close this PR, I will deal with it |
|
Isn't there a problem of message loss with this PR? |
|
We should carefully to cherry-pick this fix to release branch. |
|
@thetumbled I will do testing to check the problem you mentioned. |
…t redevlier duplicate messages (#14327) If individual ack batch message with transaction and abort this transaction, we will redeliver this message. but this batch message some bit sit are acked by another transaction and re consume this bit sit will produce `TransactionConflictException`, we don't need to redeliver this bit sit witch is acked by another transaction. if batch have batch size 5 1. txn1 ack 0, 1 the ackSet is 00111 2. txn2 ack 2 3 4 the ack Set is 11000 3. abort txn2 redeliver this position is 00111 4. but now we don't filter txn1 ackSet so redeliver this position bitSet is 111111 When filter the message we should filter the bit sit witch is real ack or in pendingAck state add the test (cherry picked from commit e0c0d5e)
|
@congbobo184 Can you help cherry-pick it to branch 2.9? |
…t redevlier duplicate messages (apache#14327) If individual ack batch message with transaction and abort this transaction, we will redeliver this message. but this batch message some bit sit are acked by another transaction and re consume this bit sit will produce `TransactionConflictException`, we don't need to redeliver this bit sit witch is acked by another transaction. if batch have batch size 5 1. txn1 ack 0, 1 the ackSet is 00111 2. txn2 ack 2 3 4 the ack Set is 11000 3. abort txn2 redeliver this position is 00111 4. but now we don't filter txn1 ackSet so redeliver this position bitSet is 111111 When filter the message we should filter the bit sit witch is real ack or in pendingAck state add the test (cherry picked from commit e0c0d5e) (cherry picked from commit 90b4f86)
…t redevlier duplicate messages (#14327) ### Motivation If individual ack batch message with transaction and abort this transaction, we will redeliver this message. but this batch message some bit sit are acked by another transaction and re consume this bit sit will produce `TransactionConflictException`, we don't need to redeliver this bit sit witch is acked by another transaction. if batch have batch size 5 1. txn1 ack 0, 1 the ackSet is 00111 2. txn2 ack 2 3 4 the ack Set is 11000 3. abort txn2 redeliver this position is 00111 4. but now we don't filter txn1 ackSet so redeliver this position bitSet is 111111 ### Modifications When filter the message we should filter the bit sit witch is real ack or in pendingAck state ### Verifying this change add the test
|
As discussed on the mailing list https://lists.apache.org/thread/w4jzk27qhtosgsz7l9bmhf1t7o9mxjhp, there is no plan to release 2.9.6, so I am going to remove the release/2.9.6 label |
Motivation
If individual ack batch message with transaction and abort this transaction, we will redeliver this message. but this batch message some bit sit are acked by another transaction and re consume this bit sit will produce
TransactionConflictException, we don't need to redeliver this bit sit witch is acked by another transaction.if batch have batch size 5
Modifications
When filter the message we should filter the bit sit witch is real ack or in pendingAck state
Verifying this change
add the test
Does this pull request potentially affect one of the following parts:
If
yeswas chosen, please highlight the changesDocumentation
Does this pull request introduce a new feature? (yes)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
If a feature is not applicable for documentation, explain why?
If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
doc-not-needed