poorbarcode commented on code in PR #16685:
URL: https://github.com/apache/pulsar/pull/16685#discussion_r925579796
##########
pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/impl/MLTransactionLogImpl.java:
##########
@@ -283,4 +365,43 @@ public void readEntriesFailed(ManagedLedgerException
exception, Object ctx) {
}
}
+
+ private static final FastThreadLocal<BatchedTransactionMetadataEntry>
localBatchedTransactionLogCache =
+ new FastThreadLocal<>() {
+ @Override
+ protected BatchedTransactionMetadataEntry initialValue()
throws Exception {
+ return new BatchedTransactionMetadataEntry();
+ }
+ };
Review Comment:
It works, we used `ThreadLocal` here, should not recycle.
--
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]