thetumbled commented on issue #19629:
URL: https://github.com/apache/pulsar/issues/19629#issuecomment-1451206448

   > like the above scene 7. tc reload, the TransactionOne has been committed, 
so the transactionOne can't be in TC 8. client recommitted this transaction 
will throw TransactionNotFoundException 9. how user know the transactionOne 
committed or timeout aborted?
   > 
   > Currently, Pulsar transaction does not support binding with local 
transactions, the server needs to notify the client, if you want to binding 
local transaction.
   > 
   > current we only support
   > 
   > 1. consumer ack with transaction
   > 2. producer produce with transaction
   > 3. end this transaction
   > 
   > if this transaction failed, the consumer will rereceive this message and 
process it again. so in this case, we don't need to let the user can know if 
the transaction was committed or aborted, only redeliver this message again is 
enough.
   
   If transactionOne is committed successfully and client reproduce messages in 
transactionOne, message duplication will occur, which violate the exactly-once 
semantics.
   And i have mention `TransactionNotFoundException` in the analysis in the 
issue, which can not be fixed by https://github.com/apache/pulsar/pull/19662. 
But I have figure out a simple patch. We can hold txnMeta in txnMetaMap for 
transaction-timeout. If the transaction time out, client can not issue the 
commit request anymore, so we do not need to hold the txnMeta in memory 
anymore. Currently, the txnMeta will be removed instantly after the transaction 
is terminated, which will result into `TransactionNotFoundException`.


-- 
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