You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/02/16 15:13:30 UTC

[GitHub] [pulsar] congbobo184 opened a new pull request #14327: [Transaction] Fix individual ack batch message with transaction abort redevlier duplicate messages

congbobo184 opened a new pull request #14327:
URL: https://github.com/apache/pulsar/pull/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
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API: (no)
     - The schema: (no)
     - The default values of configurations: (no)
     - The wire protocol: (no)
     - The rest endpoints: (no)
     - The admin cli options: (no)
     - Anything that affects deployment: (no)
   
   ### Documentation
   
     - 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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] github-actions[bot] commented on pull request #14327: [Transaction] Fix individual ack batch message with transaction abort redevlier duplicate messages

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #14327:
URL: https://github.com/apache/pulsar/pull/14327#issuecomment-1041597493


   @congbobo184:Thanks for your contribution. For this PR, do we need to update docs?
   (The [PR template contains info about doc](https://github.com/apache/pulsar/blob/master/.github/PULL_REQUEST_TEMPLATE.md#documentation), which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] github-actions[bot] commented on pull request #14327: [Transaction] Fix individual ack batch message with transaction abort redevlier duplicate messages

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #14327:
URL: https://github.com/apache/pulsar/pull/14327#issuecomment-1041690384


   @congbobo184:Thanks for providing doc info!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] Jason918 commented on a change in pull request #14327: [Transaction] Fix individual ack batch message with transaction abort redevlier duplicate messages

Posted by GitBox <gi...@apache.org>.
Jason918 commented on a change in pull request #14327:
URL: https://github.com/apache/pulsar/pull/14327#discussion_r835703859



##########
File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/util/PositionAckSetUtil.java
##########
@@ -46,12 +46,18 @@ public static void andAckSet(PositionImpl currentPosition, PositionImpl otherPos
         if (currentPosition == null || otherPosition == null) {
             return;
         }
-        BitSetRecyclable thisAckSet = BitSetRecyclable.valueOf(currentPosition.getAckSet());
-        BitSetRecyclable otherAckSet = BitSetRecyclable.valueOf(otherPosition.getAckSet());
+        currentPosition.setAckSet(andAckSet(currentPosition.getAckSet(), otherPosition.getAckSet()));
+    }
+
+    //This method is do `or` operation for ack set

Review comment:
       ```suggestion
       //This method is do `and` operation for ack set
   ```
   Typo?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] github-actions[bot] commented on pull request #14327: [Transaction] Fix individual ack batch message with transaction abort redevlier duplicate messages

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #14327:
URL: https://github.com/apache/pulsar/pull/14327#issuecomment-1079562348


   The pr had no activity for 30 days, mark with Stale label.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org