This is an automated email from the ASF dual-hosted git repository.

yuqi4733 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git


The following commit(s) were added to refs/heads/main by this push:
     new 2b32964b59 [#8199] improvement(core): correct lock type in TreeLock 
log messages (#8268)
2b32964b59 is described below

commit 2b32964b59d728d609c76be571a3b9cc23b4c306
Author: keepConcentration <[email protected]>
AuthorDate: Tue Aug 26 10:20:04 2025 +0900

    [#8199] improvement(core): correct lock type in TreeLock log messages 
(#8268)
    
    ### What changes were proposed in this pull request?
    
    Fixed log messages in `TreeLock.lock()` and `TreeLock.unlock()` to
    output the actual lock type (`type`) used.
    
    ### Why are the changes needed?
    
    Reflect the real lock type applied at each node at log.
    
    Fix: #8199
    
    ### Does this PR introduce _any_ user-facing change?
    
    Yes, Log messages will now output the actual lock type in
    `TreeLock.lock()` and `TreeLock.unlock()`.
    
    ### How was this patch tested?
    
    Verified log output manually during lock/unlock operations.
---
 core/src/main/java/org/apache/gravitino/lock/TreeLock.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/src/main/java/org/apache/gravitino/lock/TreeLock.java 
b/core/src/main/java/org/apache/gravitino/lock/TreeLock.java
index 76f01e5d63..d08026d33a 100644
--- a/core/src/main/java/org/apache/gravitino/lock/TreeLock.java
+++ b/core/src/main/java/org/apache/gravitino/lock/TreeLock.java
@@ -111,7 +111,7 @@ public class TreeLock {
           LOG.trace(
               "Node {} has been lock with '{}' lock, hold by {} with ident 
'{}' at {}",
               this,
-              lockType,
+              type,
               Thread.currentThread(),
               identifier,
               System.currentTimeMillis());
@@ -155,7 +155,7 @@ public class TreeLock {
         LOG.trace(
             "Node {} has been unlock with '{}' lock, hold by {} with ident 
'{}' for {} ms",
             this,
-            lockType,
+            type,
             Thread.currentThread(),
             identifier,
             System.currentTimeMillis() - holdStartTime);

Reply via email to