congbobo184 commented on a change in pull request #8719:
URL: https://github.com/apache/pulsar/pull/8719#discussion_r532005951



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/buffer/impl/TopicTransactionBuffer.java
##########
@@ -53,14 +150,36 @@ public TopicTransactionBuffer(PersistentTopic topic) {
 
     @Override
     public CompletableFuture<Position> appendBufferToTxn(TxnID txnId, long 
sequenceId, ByteBuf buffer) {
+        if (!checkIfReady()) {
+            return FutureUtil.failedFuture(

Review comment:
       i think It makes the code clearer.




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

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


Reply via email to