mattisonchao commented on a change in pull request #14097:
URL: https://github.com/apache/pulsar/pull/14097#discussion_r801202660



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/buffer/impl/TopicTransactionBuffer.java
##########
@@ -174,6 +174,13 @@ public void recoverExceptionally(Exception e) {
     @Override
     public CompletableFuture<Void> checkIfTBRecoverCompletely(boolean 
isTxnEnabled) {
         if (!isTxnEnabled) {
+            if (!checkIfNoSnapshot() && !changeToNoSnapshotState()) {
+                log.error("[{}] Transaction buffer recover fail with 
transaction disabled", topic.getName());
+                CompletableFuture<Void> completableFuture = new 
CompletableFuture<>();

Review comment:
       At first glance, You can use ``FutureUtil.failedFuture()``instead of it.




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