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

Fix race between Updating JobPart and xferDoneMsg #1814

Merged
merged 5 commits into from
Jun 27, 2022

Conversation

nakulkar-msft
Copy link
Member

@nakulkar-msft nakulkar-msft commented Jun 1, 2022

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.

Copy link
Contributor

@Strikerzee Strikerzee left a 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.

listReq chan struct{}
partCreated chan JobPartCreatedMsg
xferDone chan xferDoneMsg
xferDoneDrained chan struct{}
Copy link
Contributor

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

ste/jobStatusManager.go Show resolved Hide resolved
@nakulkar-msft nakulkar-msft force-pushed the nakulkar/private/raceOnJobStatusMgr branch from e12917b to 4064d12 Compare June 21, 2022 03:51
@nakulkar-msft nakulkar-msft merged commit 42f9d06 into dev Jun 27, 2022
@nakulkar-msft nakulkar-msft deleted the nakulkar/private/raceOnJobStatusMgr branch October 20, 2022 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants