mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-01-18 06:30:07 +08:00
add self filer
This commit is contained in:
parent
8acd714600
commit
30dc365cbd
@ -62,9 +62,16 @@ func NewFiler(masters []string, grpcDialOption grpc.DialOption,
|
||||
func (f *Filer) AggregateFromPeers(self string, filers []string) {
|
||||
|
||||
// set peers
|
||||
if len(filers) == 0 {
|
||||
found := false
|
||||
for _, peer := range filers {
|
||||
if peer == self {
|
||||
found = true
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
filers = append(filers, self)
|
||||
}
|
||||
|
||||
f.MetaAggregator = NewMetaAggregator(filers, f.GrpcDialOption)
|
||||
f.MetaAggregator.StartLoopSubscribe(f, self)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user