codelipenghui commented on a change in pull request #5570: Transaction log 
implemention
URL: https://github.com/apache/pulsar/pull/5570#discussion_r348376518
 
 

 ##########
 File path: 
pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/TransactionMetadataStore.java
 ##########
 @@ -32,24 +33,34 @@
 public interface TransactionMetadataStore {
 
     /**
-     * Query the {@link TxnStatus} of a given transaction <tt>txnid</tt>.
+     * The state of the transactionMetadataStore {@link 
TransactionMetadataStore}.
+     */
+    enum State {
+        NONE,
+        INITIALIZING,
+        READY,
+        CLOSE
+    }
+
+    /**
+     * Query the {@link TxnStatus} of a given transaction <tt>txnId</tt>.
      *
-     * @param txnid transaction id
+     * @param txnID {@link TxnID} for get transaction status
      * @return a future represents the result of this operation.
      *         it returns {@link TxnStatus} of the given transaction.
      */
-    default CompletableFuture<TxnStatus> getTxnStatus(TxnID txnid) {
-        return getTxnMeta(txnid).thenApply(txnMeta -> txnMeta.status());
+    default CompletableFuture<TxnStatus> getTxnStatus(TxnID txnID) {
+        return getTxnMetaAsync(txnID).thenApply(TxnMeta::status);
     }
 
 Review comment:
   It's better to rename to `getTxnStatusAsync` since all async method end with 
Async

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


With regards,
Apache Git Services

Reply via email to