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

   ### Description
   
   Aside from some cleanups (typos, improving comments), this PR addresses few 
issues:
   
   1. `DirTaxoWriter.nextID` is declared `volatile` however this `nextID++` is 
not a safe-operation. Switched to `AtomicInteger`.
   2. `DirTaxoReader` protected constructor couldn't really be extended since 
`TaxonomyIndexArrays` is package-private and isn't exported by the module. 
Therefore I think it's safe to change the constructor to package-private too.
   3. Changed the [Double-Check 
Lock](https://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html) 
pattern implementation to assign the `volatile` field to a local variable, so 
that we do a volatile read only once if the reference isn't null.
   


-- 
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: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to