codelipenghui commented on code in PR #22452:
URL: https://github.com/apache/pulsar/pull/22452#discussion_r1555413683
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java:
##########
@@ -3942,9 +3942,13 @@ public void publishTxnMessage(TxnID txnID, ByteBuf
headersAndPayload, PublishCon
@Override
public CompletableFuture<Void> endTxn(TxnID txnID, int txnAction, long
lowWaterMark) {
if (TxnAction.COMMIT_VALUE == txnAction) {
- return transactionBuffer.commitTxn(txnID, lowWaterMark);
+ return transactionBuffer.commitTxn(txnID, lowWaterMark).thenRun(()
-> {
+ lastDataMessagePublishedTimestamp = Clock.systemUTC().millis();
Review Comment:
```
// Record the last time a data message (ie: not an internal Pulsar
marker) is published on the topic
@Getter
private volatile long lastDataMessagePublishedTimestamp = 0;
```
For ending transactions, we only put a marker message in the topic. From the
description of this field, it shouldn't be updated for internal markers.
Could you please provide more information of which behavior is not expected
from the user's perspective?
--
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]