diff options
| author | chrislu <chris.lu@gmail.com> | 2025-07-15 10:51:00 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2025-07-15 10:51:07 -0700 |
| commit | 64c5dde2f321dbdc24b3cdc00a17c7b6b2c8f0bd (patch) | |
| tree | ea8ba039a913c7f7b08bf73d215b4fbdceccb31b /weed/admin/dash/client_management.go | |
| parent | d78aa3d2de1a18c9802f72c926efa8e80ff2fa64 (diff) | |
| download | seaweedfs-64c5dde2f321dbdc24b3cdc00a17c7b6b2c8f0bd.tar.xz seaweedfs-64c5dde2f321dbdc24b3cdc00a17c7b6b2c8f0bd.zip | |
support multiple masters
fix https://github.com/seaweedfs/seaweedfs/issues/6988
Diffstat (limited to 'weed/admin/dash/client_management.go')
| -rw-r--r-- | weed/admin/dash/client_management.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/weed/admin/dash/client_management.go b/weed/admin/dash/client_management.go index 7bebc6dd2..974d996fc 100644 --- a/weed/admin/dash/client_management.go +++ b/weed/admin/dash/client_management.go @@ -16,11 +16,7 @@ import ( // WithMasterClient executes a function with a master client connection func (s *AdminServer) WithMasterClient(f func(client master_pb.SeaweedClient) error) error { - masterAddr := pb.ServerAddress(s.masterAddress) - - return pb.WithMasterClient(false, masterAddr, s.grpcDialOption, false, func(client master_pb.SeaweedClient) error { - return f(client) - }) + return s.masterClient.WithClient(false, f) } // WithFilerClient executes a function with a filer client connection @@ -78,7 +74,8 @@ func (s *AdminServer) getDiscoveredFilers() []string { }) if err != nil { - glog.Warningf("Failed to discover filers from master %s: %v", s.masterAddress, err) + currentMaster := s.masterClient.GetMaster(context.Background()) + glog.Warningf("Failed to discover filers from master %s: %v", currentMaster, err) // Return cached filers even if expired, better than nothing return s.cachedFilers } |
