diff --git a/core/src/main/java/com/datastrato/gravitino/lock/TreeLock.java b/core/src/main/java/com/datastrato/gravitino/lock/TreeLock.java index 87522727ee4..3bce732225a 100644 --- a/core/src/main/java/com/datastrato/gravitino/lock/TreeLock.java +++ b/core/src/main/java/com/datastrato/gravitino/lock/TreeLock.java @@ -90,7 +90,9 @@ public void lock(LockType lockType) { try { treeLockNode.lock(type); heldLocks.push(Pair.of(treeLockNode, type)); - LOG.trace("Locked node: {}, lock type: {}", treeLockNode, type); + if (LOG.isTraceEnabled()) { + LOG.trace("Locked node: {}, lock type: {}", treeLockNode, type); + } } catch (Exception e) { LOG.error( "Failed to lock the treeNode, identifier: {}, node {} of lockNodes: [{}]",