MCPcopy
hub / github.com/NVIDIA/aistore / recvCluMeta

Method recvCluMeta

ais/proxy.go:267–315  ·  view source on GitHub ↗
(cluMeta *cluMeta, action, caller string)

Source from the content-addressed store, hash-verified

265}
266
267func (p *proxy) recvCluMeta(cluMeta *cluMeta, action, caller string) (err error) {
268 msg := p.newAmsgStr(action, cluMeta.BMD)
269
270 // Config
271 debug.Assert(cluMeta.Config != nil)
272 if err = p.receiveConfig(cluMeta.Config, msg, nil, caller); err != nil {
273 if isErrDowngrade(err) {
274 err = nil
275 } else {
276 glog.Error(err)
277 }
278 // Received outdated/invalid config in cluMeta, ignore by setting to `nil`.
279 cluMeta.Config = nil
280 // fall through
281 }
282 // Smap
283 if err = p.receiveSmap(cluMeta.Smap, msg, nil /*ms payload*/, caller, p.smapOnUpdate); err != nil {
284 if !isErrDowngrade(err) {
285 glog.Error(cmn.NewErrFailedTo(p, "sync", cluMeta.Smap, err))
286 }
287 } else {
288 glog.Infof("%s: synch %s", p, cluMeta.Smap)
289 }
290 // BMD
291 if err = p.receiveBMD(cluMeta.BMD, msg, nil, caller); err != nil {
292 if !isErrDowngrade(err) {
293 glog.Error(cmn.NewErrFailedTo(p, "sync", cluMeta.BMD, err))
294 }
295 } else {
296 glog.Infof("%s: synch %s", p, cluMeta.BMD)
297 }
298 // RMD
299 if err = p.receiveRMD(cluMeta.RMD, msg, caller); err != nil {
300 if !isErrDowngrade(err) {
301 glog.Error(cmn.NewErrFailedTo(p, "sync", cluMeta.RMD, err))
302 }
303 } else {
304 glog.Infof("%s: synch %s", p, cluMeta.RMD)
305 }
306 // EtlMD
307 if err = p.receiveEtlMD(cluMeta.EtlMD, msg, nil, caller, nil); err != nil {
308 if !isErrDowngrade(err) {
309 glog.Error(cmn.NewErrFailedTo(p, "sync", cluMeta.EtlMD, err))
310 }
311 } else {
312 glog.Infof("%s: synch %s", p, cluMeta.EtlMD)
313 }
314 return
315}
316
317// stop proxy runner and return => rungroup.run
318// TODO: write shutdown-marker

Callers 2

recvCluMetaBytesMethod · 0.95
daeSetPrimaryMethod · 0.95

Calls 11

receiveBMDMethod · 0.95
receiveRMDMethod · 0.95
AssertFunction · 0.92
ErrorFunction · 0.92
NewErrFailedToFunction · 0.92
InfofFunction · 0.92
isErrDowngradeFunction · 0.85
newAmsgStrMethod · 0.80
receiveSmapMethod · 0.80
receiveEtlMDMethod · 0.80
receiveConfigMethod · 0.45

Tested by

no test coverage detected