[BUGFIX] Release lock if pool.ContainerInWorker errors.#4293
Merged
kcmannem merged 1 commit intoconcourse:masterfrom Aug 22, 2019
Merged
[BUGFIX] Release lock if pool.ContainerInWorker errors.#4293kcmannem merged 1 commit intoconcourse:masterfrom
kcmannem merged 1 commit intoconcourse:masterfrom
Conversation
08a0d45 to
6d11979
Compare
Contributor
Author
|
@ddadlani when you have a moment, can you check this small PR out? |
cirocosta
reviewed
Aug 22, 2019
atc/worker/client.go
Outdated
| if err != nil { | ||
| release_err := activeTasksLock.Release() | ||
| if release_err != nil { | ||
| return nil, release_err |
Contributor
There was a problem hiding this comment.
Hey,
Wdyt of leveraging a multierror (e.g.,
concourse/atc/gc/volume_collector.go
Line 39 in da46655
This way we wouldn't lose the original error that came from client.pool.ContainerInWorker.
Thanks!
Whenever ContainerInWorker returned an error the Active Tasks Lock would never be released, blocking any task to check for available workers and thus to start. Here the bug is fixed, by releasing the lock if the ContainerInWorker returns an error. Additionally the unit tests are expanded to verify that for every lock acquisition a lock release is also called. Signed-off-by: Alessandro Degano <[email protected]>
6d11979 to
25e5cd5
Compare
jamieklassen
pushed a commit
that referenced
this pull request
Aug 26, 2019
#4118 #4148 #4208 #4277 #4142 #4221 #4293 Signed-off-by: James Thomson <[email protected]> Co-authored-by: Jamie Klassen <[email protected]>
matthewpereira
pushed a commit
that referenced
this pull request
Sep 5, 2019
#4118 #4148 #4208 #4277 #4142 #4221 #4293 Signed-off-by: James Thomson <[email protected]> Co-authored-by: Jamie Klassen <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Whenever ContainerInWorker returned an error the Active Tasks Lock
would never be released, blocking any task to check for available
workers and thus to start.
Here the bug is fixed, by releasing the lock if the ContainerInWorker
returns an error.
Additionally the unit tests are expanded to verify that for every
lock acquisition a lock release is also called.
Signed-off-by: Alessandro Degano [email protected]