Skip to content

Commit

Permalink
fix data race
Browse files Browse the repository at this point in the history
Signed-off-by: husharp <[email protected]>
  • Loading branch information
HuSharp authored and ti-chi-bot committed Jun 17, 2024
1 parent e8fdd58 commit 01ac747
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/mcs/resourcemanager/server/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ func (m *Manager) Init(ctx context.Context) error {
return err
}
// Load resource group meta info from storage.
m.Lock()
m.groups = make(map[string]*ResourceGroup)
m.Unlock()
handler := func(k, v string) {
group := &rmpb.ResourceGroup{}
if err := proto.Unmarshal([]byte(v), group); err != nil {
Expand Down

0 comments on commit 01ac747

Please sign in to comment.