Skip to content

fix: Resolve race condition between visited flag and result of ready postcondition #2886

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

Merged
merged 1 commit into from
Aug 7, 2025

Conversation

ds-akloskowski
Copy link
Contributor

Fix for a problem described in #2885.

The changed code causes that when visited flag is changed to true, we are sure that readyPostconditionResult was checked before. In previous version, visited flag set to true and readyPostconditionResult equals null could describe two situations:

  1. A resource was visited and its readyPostcondition is null.
  2. A resource was visited and its readyPostcondition exists, but wasn't wasn't checked (race condition).

The changed code doesn't let the second situation to happen.

@openshift-ci openshift-ci bot requested review from csviri and xstefank August 6, 2025 10:14
@csviri
Copy link
Collaborator

csviri commented Aug 7, 2025

Makes sense, thank you @ds-akloskowski

@csviri csviri merged commit 4bb58aa into operator-framework:main Aug 7, 2025
25 checks passed
@metacosm
Copy link
Collaborator

metacosm commented Aug 8, 2025

Thank you!

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.

4 participants