Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle has potential data race #29181

Closed
xuyifangreeneyes opened this issue Oct 27, 2021 · 2 comments · Fixed by #30550
Closed

Handle has potential data race #29181

xuyifangreeneyes opened this issue Oct 27, 2021 · 2 comments · Fixed by #30550
Assignees
Labels
sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.

Comments

@xuyifangreeneyes
Copy link
Contributor

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.

@xuyifangreeneyes xuyifangreeneyes added the type/enhancement The issue or PR belongs to an enhancement. label Oct 27, 2021
@xuyifangreeneyes
Copy link
Contributor Author

/sig planner

@kennytm kennytm added the sig/planner SIG: Planner label Oct 27, 2021
@xuyifangreeneyes
Copy link
Contributor Author

/assign xuyifangreeneyes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/planner SIG: Planner type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants