filer: leveldb2 supports peers also

This commit is contained in:
Chris Lu
2020-07-13 00:05:20 -07:00
parent 5ba894bb72
commit 7597831cac
3 changed files with 13 additions and 14 deletions

View File

@@ -61,14 +61,11 @@ func NewFiler(masters []string, grpcDialOption grpc.DialOption,
func (f *Filer) AggregateFromPeers(self string, filers []string) {
// set peers
if strings.HasPrefix(f.GetStore().GetName(), "leveldb") && len(filers) > 0 {
glog.Fatalf("filers using separate leveldb stores should not configure %d peers %+v", len(filers), filers)
}
if len(filers) == 0 {
filers = append(filers, self)
}
f.MetaAggregator = NewMetaAggregator(filers, f.GrpcDialOption)
f.MetaAggregator.StartLoopSubscribe(f, self, time.Now().UnixNano())
f.MetaAggregator.StartLoopSubscribe(f, self)
}