mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
check whether shares the same filer store
This commit is contained in:
parent
bba90ff3c8
commit
d741ed66db
|
@ -139,3 +139,15 @@ func (ma *MetaAggregator) subscribeToOneFiler(f *Filer, self string, filer strin
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (ma *MetaAggregator) isSameFilerStore(f *Filer, peer string) (isSame bool, err error) {
|
||||
err = pb.WithFilerClient(peer, ma.grpcDialOption, func(client filer_pb.SeaweedFilerClient) error {
|
||||
resp, err := client.GetFilerConfiguration(context.Background(), &filer_pb.GetFilerConfigurationRequest{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
isSame = f.Signature == resp.Signature
|
||||
return nil
|
||||
})
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue