lhotari commented on code in PR #22452:
URL: https://github.com/apache/pulsar/pull/22452#discussion_r1557188141


##########
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:
   @thetumbled The high-level idea in the test looks fine, but it would be 
better to have it in a completely separate test class since there could be a 
need to enable transactions etc.. We tend to add too many unrelated tests in 
single test class and that causes problems. There's no need to have a 1-to-1 
mapping between a production code class and a test class. That's leading to 
some problems in our test design. The test class name could be 
"TransactionalReplicateSubscriptionTest". (btw. the existing test class name 
"ReplicatorSubscriptionTest" has a 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: [email protected]

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

Reply via email to