diff options
| author | chrislu <chris.lu@gmail.com> | 2023-09-21 20:08:20 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2023-09-21 20:08:20 -0700 |
| commit | 49a470bcdfca06bd984ca0e6c6ef7a4afcc6c87a (patch) | |
| tree | 49356c91b49b258c155a7a7439f3d48e5807c1ef | |
| parent | 8b2c39f2c06be2ec5c5b3ca93a87f134e46de219 (diff) | |
| download | seaweedfs-49a470bcdfca06bd984ca0e6c6ef7a4afcc6c87a.tar.xz seaweedfs-49a470bcdfca06bd984ca0e6c6ef7a4afcc6c87a.zip | |
reduce logs
| -rw-r--r-- | weed/util/lock_table.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/weed/util/lock_table.go b/weed/util/lock_table.go index 015e424f9..1a4f029f8 100644 --- a/weed/util/lock_table.go +++ b/weed/util/lock_table.go @@ -65,7 +65,7 @@ func (lt *LockTable[T]) AcquireLock(intention string, key T, lockType LockType) entry.mu.Lock() if len(entry.waiters) > 0 || lockType == ExclusiveLock { glog.V(4).Infof("ActiveLock %d %s wait for %+v type=%v with waiters %d active %d.\n", lock.ID, lock.intention, key, lockType, len(entry.waiters), entry.activeLockOwnerCount) - if len(entry.waiters) > 0 { + if glog.V(4) && len(entry.waiters) > 0 { for _, waiter := range entry.waiters { fmt.Printf(" %d", waiter.ID) } @@ -92,7 +92,7 @@ func (lt *LockTable[T]) AcquireLock(intention string, key T, lockType LockType) // Otherwise, grant the lock entry.lockType = lockType glog.V(4).Infof("ActiveLock %d %s locked %+v type=%v with waiters %d active %d.\n", lock.ID, lock.intention, key, lockType, len(entry.waiters), entry.activeLockOwnerCount) - if len(entry.waiters) > 0 { + if glog.V(4) && len(entry.waiters) > 0 { for _, waiter := range entry.waiters { fmt.Printf(" %d", waiter.ID) } |
