Browse Source

Enable filer discovery with empty filerGroup

Empty filerGroup is a valid value representing the default group.
The master client can discover filers even when filerGroup is empty.

**Change:**
- Remove the filerGroup != "" check in NewFilerClient
- Keep only masterClient != nil check
- Empty string will be passed to ListClusterNodes API as-is

This enables filer discovery to work with the default group.
pull/7550/head
Chris Lu 1 week ago
parent
commit
5b88ba0842
  1. 3
      weed/wdclient/filer_client.go

3
weed/wdclient/filer_client.go

@ -169,7 +169,8 @@ func NewFilerClient(filerAddresses []pb.ServerAddress, grpcDialOption grpc.DialO
} }
// Start filer discovery if master client is configured // Start filer discovery if master client is configured
if masterClient != nil && filerGroup != "" {
// Empty filerGroup is valid (represents default group)
if masterClient != nil {
fc.stopDiscovery = make(chan struct{}) fc.stopDiscovery = make(chan struct{})
go fc.discoverFilers() go fc.discoverFilers()
glog.V(0).Infof("FilerClient: started filer discovery for group '%s' (refresh interval: %v)", filerGroup, discoveryInterval) glog.V(0).Infof("FilerClient: started filer discovery for group '%s' (refresh interval: %v)", filerGroup, discoveryInterval)

Loading…
Cancel
Save