Skip to content
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

Fixes data race during Admin Console initialization #24793

Merged

Conversation

avpinchuk
Copy link
Contributor

Synchronize access to fields accessed from many threads.

@avpinchuk avpinchuk added the bug Something isn't working label Feb 6, 2024
@avpinchuk avpinchuk added this to the 7.0.13 milestone Feb 6, 2024
@avpinchuk avpinchuk self-assigned this Feb 6, 2024
@avpinchuk avpinchuk marked this pull request as ready for review February 6, 2024 23:14
@hs536
Copy link
Contributor

hs536 commented Feb 7, 2024

What kind of problems can the current code cause?
( Is there a possibility of conflict in the loading process of the RestModule...?

Copy link
Contributor

@dmatej dmatej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe I can see it. The init method can be called by different thread than service method, but they use the same attribute, which can sometimes lead to a situation when the service method would use an old value.

@avpinchuk
Copy link
Contributor Author

What kind of problems can the current code cause?
( Is there a possibility of conflict in the loading process of the RestModule...?

Because Admin Console init in separate thread (the InstallerThread), service method in adapter can see inappropriate state value and therefore may try to load the console several times (in the worst case, on every request).

@avpinchuk
Copy link
Contributor Author

The init method can be called by different thread than service method, but they use the same attribute, which can sometimes lead to a situation when the service method would use an old value.

Yes, this is also one of the possible problems

@arjantijms arjantijms merged commit 6611a36 into eclipse-ee4j:master Feb 7, 2024
2 checks passed
@avpinchuk
Copy link
Contributor Author

I will make several builds of the master branch at different time. I hope this fix help stabilize application-tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants