merlimat commented on a change in pull request #11880:
URL: https://github.com/apache/pulsar/pull/11880#discussion_r700384425



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/PulsarClusterMetadataTeardown.java
##########
@@ -146,9 +146,7 @@ public static void main(String[] args) throws Exception {
     private static void deleteLedger(BookKeeper bookKeeper, long ledgerId) {
         try {
             bookKeeper.deleteLedger(ledgerId);
-            if (log.isDebugEnabled()) {
-                log.debug("Delete ledger id: {}", ledgerId);
-            }
+            log.debug("Delete ledger id: {}", ledgerId);

Review comment:
       This is needed, otherwise the `ledgerId` which is a `long`, gets 
converted into a `Long` causing a heap allocation.

##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/TransactionMetadataStoreService.java
##########
@@ -271,10 +269,8 @@ public long getLowWaterMark(TxnID txnID) {
                         LOG.error("EndTransaction UpdateTxnStatus fail! TxnId 
: {}, "
                                 + "TxnAction : {}", txnID, txnAction, e);
                     } else {
-                        if (LOG.isDebugEnabled()) {
-                            LOG.debug("EndTransaction UpdateTxnStatus op 
retry! TxnId : {}, "
+                        LOG.debug("EndTransaction UpdateTxnStatus op retry! 
TxnId : {}, "

Review comment:
       These calls with multiple args would trigger the allocation of a 
`Object[]` to contain them.




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