-
Notifications
You must be signed in to change notification settings - Fork 23
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
[core] OCTRL-911 Transitions should not be performed concurrently #600
Merged
knopers8
merged 1 commit into
AliceO2Group:master
from
knopers8:fix-concurrent-transitions
Jul 31, 2024
Merged
[core] OCTRL-911 Transitions should not be performed concurrently #600
knopers8
merged 1 commit into
AliceO2Group:master
from
knopers8:fix-concurrent-transitions
Jul 31, 2024
Conversation
This file contains 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
teo
previously approved these changes
Jul 30, 2024
knopers8
changed the title
[core] OCTRL-911 Transitions should not be performed concurrently
WIP [core] OCTRL-911 Transitions should not be performed concurrently
Jul 31, 2024
Do not merge yet, I managed to cause a segfault with two concurrent DESTROY attempts. While the 2nd one waits until the 1st one succeeds, it sees a |
knopers8
force-pushed
the
fix-concurrent-transitions
branch
from
July 31, 2024 07:31
f8c0e57
to
d193466
Compare
OK, dumb me, it's good now (I checked whether envs.environment() returned error too late). |
knopers8
changed the title
WIP [core] OCTRL-911 Transitions should not be performed concurrently
[core] OCTRL-911 Transitions should not be performed concurrently
Jul 31, 2024
teo
approved these changes
Jul 31, 2024
knopers8
added a commit
to knopers8/Control
that referenced
this pull request
Jul 31, 2024
This is a fix to avoid running a second teardown attempt after a successful one. This could have happened if the 2nd teardown request was received while the 1st teardown attempt would be still ongoing. In principle AliceO2Group#600 was already enough to avoid concurrency issues and I could not make the core misbehave with it, but this commit attempts to make the behaviour somewhat more correct. I hesitated to set the state as DONE if TeardownEnvironment returns earlier with an error, since this does not remove given environment from the list of enviroments, thus technically it is still available for more teardown attempts. On another hand, this contradicts the already published kafka events, which advertize the env state as DONE even when it ends with error and the state is not set anyway.
knopers8
added a commit
to knopers8/Control
that referenced
this pull request
Jul 31, 2024
This is a fix to avoid running a second teardown attempt after a successful one. This could have happened if the 2nd teardown request was received while the 1st teardown attempt would be still ongoing. In principle AliceO2Group#600 was already enough to avoid concurrency issues and I could not make the core misbehave with it, but this commit attempts to make the behaviour somewhat more correct. I hesitated to set the state as DONE if TeardownEnvironment returns earlier with an error, since this does not remove given environment from the list of enviroments, thus technically it is still available for more teardown attempts. On another hand, this contradicts the already published kafka events, which advertize the env state as DONE even when it ends with error and the state is not set anyway.
teo
pushed a commit
that referenced
this pull request
Aug 1, 2024
This is a fix to avoid running a second teardown attempt after a successful one. This could have happened if the 2nd teardown request was received while the 1st teardown attempt would be still ongoing. In principle #600 was already enough to avoid concurrency issues and I could not make the core misbehave with it, but this commit attempts to make the behaviour somewhat more correct. I hesitated to set the state as DONE if TeardownEnvironment returns earlier with an error, since this does not remove given environment from the list of enviroments, thus technically it is still available for more teardown attempts. On another hand, this contradicts the already published kafka events, which advertize the env state as DONE even when it ends with error and the state is not set anyway.
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.
Tested on staging with a few different cases when tasks go to ERROR, the protection works and there are no deadlocks.