fresh filer store bootstrap from the oldest peer

This commit is contained in:
chrislu
2022-05-30 21:27:48 -07:00
parent 490e0850bf
commit 6adc42147f
6 changed files with 56 additions and 31 deletions

View File

@@ -24,7 +24,7 @@ type MasterClient struct {
vidMap
OnPeerUpdate func(update *master_pb.ClusterNodeUpdate)
OnPeerUpdate func(update *master_pb.ClusterNodeUpdate, startFrom time.Time)
}
func NewMasterClient(grpcDialOption grpc.DialOption, filerGroup string, clientType string, clientHost pb.ServerAddress, clientDataCenter string, masters map[string]pb.ServerAddress) *MasterClient {
@@ -182,7 +182,7 @@ func (mc *MasterClient) tryConnectToMaster(master pb.ServerAddress) (nextHintedL
glog.V(0).Infof("- %s.%s %s leader:%v\n", update.FilerGroup, update.NodeType, update.Address, update.IsLeader)
}
stats.MasterClientConnectCounter.WithLabelValues(stats.OnPeerUpdate).Inc()
mc.OnPeerUpdate(update)
mc.OnPeerUpdate(update, time.Now())
}
}
}