From 253ec73a17822a37a7b1dde8a7bfd7a3217606ad Mon Sep 17 00:00:00 2001 From: chrislu Date: Sun, 5 May 2024 12:19:31 -0700 Subject: [PATCH] log --- weed/cluster/lock_manager/lock_ring.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/weed/cluster/lock_manager/lock_ring.go b/weed/cluster/lock_manager/lock_ring.go index 9edee1e96..808f559ee 100644 --- a/weed/cluster/lock_manager/lock_ring.go +++ b/weed/cluster/lock_manager/lock_ring.go @@ -1,6 +1,7 @@ package lock_manager import ( + "github.com/seaweedfs/seaweedfs/weed/glog" "github.com/seaweedfs/seaweedfs/weed/pb" "github.com/seaweedfs/seaweedfs/weed/util" "sort" @@ -39,9 +40,11 @@ func (r *LockRing) SetTakeSnapshotCallback(onTakeSnapshot func(snapshot []pb.Ser // AddServer adds a server to the ring // if the previous snapshot passed the snapshot interval, create a new snapshot func (r *LockRing) AddServer(server pb.ServerAddress) { + glog.V(0).Infof("add server %v", server) r.Lock() if _, found := r.candidateServers[server]; found { + glog.V(0).Infof("add server: already exists %v", server) r.Unlock() return } @@ -53,6 +56,8 @@ func (r *LockRing) AddServer(server pb.ServerAddress) { } func (r *LockRing) RemoveServer(server pb.ServerAddress) { + glog.V(0).Infof("remove server %v", server) + r.Lock() if _, found := r.candidateServers[server]; !found {