congbobo184 opened a new pull request #14371:
URL: https://github.com/apache/pulsar/pull/14371


   https://github.com/apache/pulsar/pull/10478
   
   ### Motivation
   since #10478 merged, we should change the cumulative ack with transaction 
abort redeliver logical. We can't redeliver unCumulativeAck message by server 
because client will receive the new message and ack then will receive the old 
message they abort. 
   
   in this case:
   1. we have 5 message
   2. cumulative ack 3 message with transaction
   3. we abort this transaction
   4. server redeliver message by the current consumer_epoch
   5. client will not filter the 4 or 5 message, because in #10478 we don't 
change the client consumer epoch
   6. client cumulative ack 4 5 with transaction and commit will lose the 1 2 3 
message and the consume message not in order.
   ### Modifications
   1. Transaction state change to timeout, if have cumulative ack with 
transaction in this transaction, we redevlier
   2. Transaction abort we redeliver
   3. Transaction commit throw TransactionNotFoundException we redeliver
   ### Verifying this change
   don't need to add test, the original test has been overwritten
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to