Skip to content

Commit

Permalink
rc: fix group change will meet data race (#8268) (#8294)
Browse files Browse the repository at this point in the history
close #8267

Signed-off-by: husharp <[email protected]>

Co-authored-by: husharp <[email protected]>
  • Loading branch information
ti-chi-bot and HuSharp authored Jun 17, 2024
1 parent 7f4c846 commit 22c5c9e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/mcs/resource_manager/server/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,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 22c5c9e

Please sign in to comment.