You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2022/12/01 16:50:00 UTC
[GitHub] [yunikorn-core] pbacsko opened a new pull request, #464: [YUNIKORN-1441] Data race in TestTimeoutPlaceholderAllocReleased
pbacsko opened a new pull request, #464:
URL: https://github.com/apache/yunikorn-core/pull/464
### What is this PR for?
A data race can occur in a unit test which uses {{Application.addPlaceholderData()}}.
### What type of PR is it?
* [x] - Bug Fix
* [ ] - Improvement
* [ ] - Feature
* [ ] - Documentation
* [ ] - Hot Fix
* [ ] - Refactoring
### Todos
* [ ] - Task
### What is the Jira issue?
https://issues.apache.org/jira/browse/YUNIKORN-1441
### How should this be tested?
### Screenshots (if appropriate)
### Questions:
* [ ] - The licenses files need update.
* [ ] - There is breaking changes for older versions.
* [ ] - It needs documentation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [yunikorn-core] craigcondit closed pull request #464: [YUNIKORN-1441] Data race in TestTimeoutPlaceholderAllocReleased
Posted by GitBox <gi...@apache.org>.
craigcondit closed pull request #464: [YUNIKORN-1441] Data race in TestTimeoutPlaceholderAllocReleased
URL: https://github.com/apache/yunikorn-core/pull/464
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [yunikorn-core] pbacsko commented on a diff in pull request #464: [YUNIKORN-1441] Data race in TestTimeoutPlaceholderAllocReleased
Posted by GitBox <gi...@apache.org>.
pbacsko commented on code in PR #464:
URL: https://github.com/apache/yunikorn-core/pull/464#discussion_r1037890761
##########
pkg/scheduler/objects/application.go:
##########
@@ -1782,3 +1782,10 @@ func (sa *Application) SetTimedOutPlaceholder(taskGroupName string, timedOut int
sa.placeholderData[taskGroupName].TimedOut = timedOut
}
}
+
+// test only
+func (sa *Application) addPlaceholderDataWithLocking(ask *AllocationAsk) {
+ sa.Lock()
+ defer sa.Unlock()
+ sa.addPlaceholderData(ask)
+}
Review Comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [yunikorn-core] craigcondit commented on a diff in pull request #464: [YUNIKORN-1441] Data race in TestTimeoutPlaceholderAllocReleased
Posted by GitBox <gi...@apache.org>.
craigcondit commented on code in PR #464:
URL: https://github.com/apache/yunikorn-core/pull/464#discussion_r1037492395
##########
pkg/scheduler/objects/application.go:
##########
@@ -1782,3 +1782,10 @@ func (sa *Application) SetTimedOutPlaceholder(taskGroupName string, timedOut int
sa.placeholderData[taskGroupName].TimedOut = timedOut
}
}
+
+// test only
+func (sa *Application) addPlaceholderDataWithLocking(ask *AllocationAsk) {
+ sa.Lock()
+ defer sa.Unlock()
+ sa.addPlaceholderData(ask)
+}
Review Comment:
Move this function into application_test.go since it is test-only. It's in the same package so will still compile.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [yunikorn-core] codecov[bot] commented on pull request #464: [YUNIKORN-1441] Data race in TestTimeoutPlaceholderAllocReleased
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #464:
URL: https://github.com/apache/yunikorn-core/pull/464#issuecomment-1334063710
# [Codecov](https://codecov.io/gh/apache/yunikorn-core/pull/464?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#464](https://codecov.io/gh/apache/yunikorn-core/pull/464?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f38b857) into [master](https://codecov.io/gh/apache/yunikorn-core/commit/c61511fe84a1ae211046aa58f156ac2185892e8f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c61511f) will **increase** coverage by `0.01%`.
> The diff coverage is `100.00%`.
```diff
@@ Coverage Diff @@
## master #464 +/- ##
==========================================
+ Coverage 72.77% 72.79% +0.01%
==========================================
Files 67 67
Lines 10011 10015 +4
==========================================
+ Hits 7286 7290 +4
Misses 2480 2480
Partials 245 245
```
| [Impacted Files](https://codecov.io/gh/apache/yunikorn-core/pull/464?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [pkg/scheduler/objects/application.go](https://codecov.io/gh/apache/yunikorn-core/pull/464/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGtnL3NjaGVkdWxlci9vYmplY3RzL2FwcGxpY2F0aW9uLmdv) | `58.45% <100.00%> (+0.13%)` | :arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org