fix bug due to data racing on VidMap (#3606)

This commit is contained in:
LHHDZ
2022-09-06 11:00:16 +08:00
committed by GitHub
parent 7c277f36ec
commit bc629665de
3 changed files with 48 additions and 6 deletions

View File

@@ -43,8 +43,8 @@ type vidMap struct {
cache *vidMap
}
func newVidMap(dataCenter string) vidMap {
return vidMap{
func newVidMap(dataCenter string) *vidMap {
return &vidMap{
vid2Locations: make(map[uint32][]Location),
ecVid2Locations: make(map[uint32][]Location),
DataCenter: dataCenter,