-
Notifications
You must be signed in to change notification settings - Fork 216
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
Fix race between Updating JobPart and xferDoneMsg #1814
Conversation
477ac22
to
f2aca48
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall. Please rebase with the dev (containing the brand-new app ctx changes) before merge.
ste/jobStatusManager.go
Outdated
listReq chan struct{} | ||
partCreated chan JobPartCreatedMsg | ||
xferDone chan xferDoneMsg | ||
xferDoneDrained chan struct{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would greatly help if we could add a comment explaining that these 2 new variables have been added in order to fix the race condition. Otherwise, it does not look very obvious to me
e12917b
to
4064d12
Compare
XDM folks have seen a race between ReportJobPartDone() and handleStatusUpdateMessage(), which would cause handleStatusUpdateMessage() to report incorrect statistics wrt. JobSummary. This PR will fix the race.