Skip to content

Commit

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

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

Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
  • Loading branch information
HuSharp and ti-chi-bot[bot] authored Jun 11, 2024
1 parent e767c01 commit c015f14
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 c015f14

Please sign in to comment.