You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/04/12 01:16:47 UTC

[GitHub] [pulsar] congbobo184 commented on a change in pull request #10182: Issue 10181: Transactions: broker side NullPointerException in case of enableTransactionCoordinator=false

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



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
##########
@@ -1777,7 +1778,16 @@ protected void handleNewTxn(CommandNewTxn command) {
             log.debug("Receive new txn request {} to transaction meta store {} from {}.",
                     requestId, tcId, remoteAddress);
         }
-        service.pulsar().getTransactionMetadataStoreService().newTransaction(tcId, command.getTxnTtlSeconds())
+        TransactionMetadataStoreService transactionMetadataStoreService =
+                service.pulsar().getTransactionMetadataStoreService();
+        if (transactionMetadataStoreService == null) {
+            ServiceUnitNotReadyException ex =

Review comment:
       may be add a ```TransactionNotAllowedException``` is better.




-- 
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:
users@infra.apache.org