Skip to content

Conversation

@lahodaj
Copy link
Contributor

@lahodaj lahodaj commented Feb 19, 2025

No description provided.

@lahodaj lahodaj added the Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form) label Feb 19, 2025
@lahodaj lahodaj added this to the NB26 milestone Feb 19, 2025
@lahodaj lahodaj requested a review from dbalek February 19, 2025 17:58
@lahodaj
Copy link
Contributor Author

lahodaj commented Feb 25, 2025

I have seen some fairly frequent deadlocks on start with the original patch. I don't think it was directly caused by the change here, as I think I've seen a deadlock like that even before, but this change might have made the deadlock much more probable.

The deadlock was Project mutex -> SourceImpl monitor (when the project properties were set) vs SourceImpl monitor -> Project mutex computing the roots, and querying the properties.

The solution for the deadlock proposed here is to only record something changed when the poperties change, and compute on the first access, and limit locking when computing the roots.

Copy link
Contributor

@dbalek dbalek left a comment

Choose a reason for hiding this comment

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

Looks fine.

@lahodaj lahodaj merged commit 4cdab1e into apache:master Feb 27, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Java [ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants