Just trying to understand which local extends are still relevant OR need refactoring after migration to Lucene 5. We use BitSets in online and multi-threaded batch applications.
it seems FixedBitSet can be potentially used in divide and conquer by applications without any locking. Thanks Toke. On Sun, Sep 13, 2015 at 11:39 AM, Toke Eskildsen <t...@statsbiblioteket.dk> wrote: > 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 > >