mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Check the return value from store.Update
This commit is contained in:
parent
8a12334683
commit
c264338741
@ -185,8 +185,11 @@ func (c *assumeCache) add(obj interface{}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
objInfo := &objInfo{name: name, latestObj: obj, apiObj: obj}
|
objInfo := &objInfo{name: name, latestObj: obj, apiObj: obj}
|
||||||
c.store.Update(objInfo)
|
if err = c.store.Update(objInfo); err != nil {
|
||||||
klog.V(10).Infof("Adding %v %v to assume cache: %+v ", c.description, name, obj)
|
klog.Warningf("got error when updating stored object : %v", err)
|
||||||
|
} else {
|
||||||
|
klog.V(10).Infof("Adding %v %v to assume cache: %+v ", c.description, name, obj)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *assumeCache) update(oldObj interface{}, newObj interface{}) {
|
func (c *assumeCache) update(oldObj interface{}, newObj interface{}) {
|
||||||
|
Loading…
Reference in New Issue
Block a user