-
Notifications
You must be signed in to change notification settings - Fork 83
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: Data races detected from Batch function #448 #449
Conversation
After analyzing those data races as listed in #448, there're two variables shall be in atomic operation to avoid data races: 1. batchData 2. timerActive This commit from the batchData [][]byte to atomicBatchData to avoid data race and update timerActive from bool to atomicBool to avoid data race Signed-off-by: Jude Hung <[email protected]>
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.
Looks good. Need @rsdmike to also take a look.
recheck |
The first time this job ran -- we saw the same issue with a race condition on the ARM platform so I'm not convinced it has fixed anything. Running it again it passed. I'd like to run the job a couple more times on this PR and monitor the stability of it the pass rate. |
@rsdmike if using batch function in the pipeline, the system would run out of memory in couple hours. |
@judehung please rebase |
After analyzing those data races as listed in #448, there're two
variables shall be in atomic operation to avoid data races:
This commit from the batchData [][]byte to atomicBatchData to avoid data
race and update timerActive from bool to atomicBool to avoid data race
Signed-off-by: Jude Hung [email protected]
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
12 data races are detected from batch function
Issue Number:
#448
What is the new behavior?
Clean up all these data races detected from batch function
Does this PR introduce a breaking change?
Are there any new imports or modules? If so, what are they used for and why?
Are there any specific instructions or things that should be known prior to reviewing?
https://golang.org/doc/articles/race_detector.html#:~:text=A%20data%20race%20occurs%20when,Go%20Memory%20Model%20for%20details.
Other information