Skip to content

Handle has potential data race #29181

@xuyifangreeneyes

Description

@xuyifangreeneyes

Enhancement

updateStatsWorker periodically calls (*Handle).DumpStatsDeltaToKV and (*Handle).UpdateStatsByLocalFeedback and the both functions calls (*Handle).sweepList. In another word, (*Handle).sweepList may be concurrently called by different callers. (*Handle).sweepList calls (*Handle).merge, which writes Handle.globalMap and Handle.feedback without acquiring lock. Hence data race may occur. Maybe we should prevent concurrently writing Handle.globalMap and Handle.feedback.

Metadata

Metadata

Labels

sig/plannerSIG: Plannertype/enhancementThe issue or PR belongs to an enhancement.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions