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



##########
File path: 
pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/impl/MLTransactionMetadataStore.java
##########
@@ -88,95 +89,110 @@ public MLTransactionMetadataStore(TransactionCoordinatorID 
tcID,
         this.abortedTransactionCount = new LongAdder();
         this.transactionTimeoutCount = new LongAdder();
         this.appendLogCount = new LongAdder();
+        this.recoverTracker = recoverTracker;
+    }
 
+    public CompletableFuture<TransactionMetadataStore> init() {

Review comment:
       should better `public CompletableFuture<TransactionMetadataStore> 
init(TransactionRecoverTracker recoverTracker)` because originally not a local 
variable of MLTransactionMetadataStore.java. It only use to tracker the 
MetadataStore recover, when recovery is complete it will be garbage collected. 
If it change to a a local variable, we should clear the recover the metadata 
from tracker, because it will not be garbage collected. So I suggest `public 
CompletableFuture<TransactionMetadataStore> init(TransactionRecoverTracker 
recoverTracker)`




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