reugn opened a new pull request, #16755:
URL: https://github.com/apache/lucene/pull/16755

   `getDefaultResources()` checks `defaultResources` for null outside the 
`synchronized` block and never rechecks inside it, so a thread that lost the 
race reloads and reparses the dictionary instead of returning the instance just 
built. The field is `volatile`, so publication was already safe.
   
   The constructor copies the result into a per-instance field, so each 
analyzer built during the race keeps its own copy of the ~7 MB dictionary 
instead of sharing one.
   
   This adds the missing null check inside the `synchronized` block.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to