Selva Kumar <selva.kumar.at.w...@gmail.com> wrote: > Subject: Lucene 5 : are FixedBitSet and SparseFixedBitSet thread-safe? <eom>
Short answer: No. Longer answer: Reading values and calling methods that does not modify the structure is fine. Writing values is not safe, but can work for FixedBitSet, if you take care not to update values within the same 64bit block from multiple Threads at a time. It is not too hard to make it Thread-safe and efficient (AtomicLongArray.compareandSet is your friend) and I made such a variant for a project, but the Solr-code is generaly very 1-request-1-Thread, so there is a lot of places to change code in order for it to take advantage of a changes FixedBitSet. What is it you are trying to achieve? - Toke Eskildsen --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org