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

Method ResyncGroupAll

pkg/topom/topom_group.go:81–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79}
80
81func (s *Topom) ResyncGroupAll() error {
82 s.mu.Lock()
83 defer s.mu.Unlock()
84 ctx, err := s.newContext()
85 if err != nil {
86 return err
87 }
88
89 for _, g := range ctx.group {
90 if err := s.resyncSlotMappingsByGroupId(ctx, g.Id); err != nil {
91 log.Warnf("group-[%d] resync-group failed", g.Id)
92 return err
93 }
94 defer s.dirtyGroupCache(g.Id)
95
96 g.OutOfSync = false
97 if err := s.storeUpdateGroup(g); err != nil {
98 return err
99 }
100 }
101 return nil
102}
103
104func (s *Topom) GroupAddServer(gid int, dc, addr string) error {
105 s.mu.Lock()

Callers

nothing calls this directly

Calls 5

newContextMethod · 0.95
dirtyGroupCacheMethod · 0.95
storeUpdateGroupMethod · 0.95
WarnfMethod · 0.80

Tested by

no test coverage detected