liangyepianzhou commented on code in PR #21114: URL: https://github.com/apache/pulsar/pull/21114#discussion_r1315298117
########## pip/pip-298.md: ########## @@ -0,0 +1,99 @@ +## Motivation + +In the implementation of the Pulsar Transaction, each topic is configured with a `Transaction Buffer` to prevent consumers from reading uncommitted messages, which are invisible until the transaction is committed. Transaction Buffer works with Position (maxReadPosition) and `TxnID` Set (aborts).`maxReadPosition` is a position (`ledgerId` + entry sequence ID) for which it is guaranteed all messages up to it belong to a finished transaction (committed or aborted). Any messages related to an in-flight transaction are after maxReadPosition. The broker only dispatches messages, before the maxReadPosition, to the consumers. When the broker dispatches the messages before maxReadPosition to the consumer, the messages sent by aborted transactions will get filtered by the Transaction Buffer. It implements it by storing all the aborted transaction IDs in memory. Review Comment: I think we do not need to explain the implementation of transaction buffer in the motivation. We can leave more information about the concept of the Pulsar transaction in the background part. -- 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]
