MCPcopy
hub / github.com/CodisLabs/codis / storeUpdateGroup

Method storeUpdateGroup

pkg/topom/topom_cache.go:178–185  ·  view source on GitHub ↗
(g *models.Group)

Source from the content-addressed store, hash-verified

176}
177
178func (s *Topom) storeUpdateGroup(g *models.Group) error {
179 log.Warnf("update group-[%d]:\n%s", g.Id, g.Encode())
180 if err := s.store.UpdateGroup(g); err != nil {
181 log.ErrorErrorf(err, "store: update group-[%d] failed", g.Id)
182 return errors.Errorf("store: update group-[%d] failed", g.Id)
183 }
184 return nil
185}
186
187func (s *Topom) storeRemoveGroup(g *models.Group) error {
188 log.Warnf("remove group-[%d]:\n%s", g.Id, g.Encode())

Callers 15

ResyncGroupMethod · 0.95
ResyncGroupAllMethod · 0.95
GroupAddServerMethod · 0.95
GroupDelServerMethod · 0.95
GroupPromoteServerMethod · 0.95
trySwitchGroupMasterMethod · 0.95
EnableReplicaGroupsMethod · 0.95
SyncCreateActionMethod · 0.95
SyncRemoveActionMethod · 0.95
SyncActionPrepareMethod · 0.95
SyncActionCompleteMethod · 0.95

Calls 5

WarnfMethod · 0.80
UpdateGroupMethod · 0.80
ErrorErrorfMethod · 0.80
ErrorfMethod · 0.80
EncodeMethod · 0.45

Tested by 2

TestGroupCacheFunction · 0.64
contextUpdateGroupFunction · 0.64