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

Method storeUpdateSlotMapping

pkg/topom/topom_cache.go:160–167  ·  view source on GitHub ↗
(m *models.SlotMapping)

Source from the content-addressed store, hash-verified

158}
159
160func (s *Topom) storeUpdateSlotMapping(m *models.SlotMapping) error {
161 log.Warnf("update slot-[%d]:\n%s", m.Id, m.Encode())
162 if err := s.store.UpdateSlotMapping(m); err != nil {
163 log.ErrorErrorf(err, "store: update slot-[%d] failed", m.Id)
164 return errors.Errorf("store: update slot-[%d] failed", m.Id)
165 }
166 return nil
167}
168
169func (s *Topom) storeCreateGroup(g *models.Group) error {
170 log.Warnf("create group-[%d]:\n%s", g.Id, g.Encode())

Callers 11

SlotCreateActionMethod · 0.95
SlotCreateActionSomeMethod · 0.95
SlotCreateActionRangeMethod · 0.95
SlotRemoveActionMethod · 0.95
SlotActionCompleteMethod · 0.95
SlotsAssignGroupMethod · 0.95
SlotsAssignOfflineMethod · 0.95
SlotsRebalanceMethod · 0.95
TestSlotsCacheFunction · 0.80
contextUpdateSlotMappingFunction · 0.80

Calls 5

WarnfMethod · 0.80
UpdateSlotMappingMethod · 0.80
ErrorErrorfMethod · 0.80
ErrorfMethod · 0.80
EncodeMethod · 0.45

Tested by 2

TestSlotsCacheFunction · 0.64
contextUpdateSlotMappingFunction · 0.64