[infinispan-dev] Enhanced safety of Lucene directory reader locker

Anuj Shah anujshahwork at gmail.com
Tue Aug 18 07:55:45 EDT 2015


Hello,

When using the Lucene directory in production we have encountered many
instances of files being removed incorrectly.

After much investigation, we found issues and logged:

   - ISPN-4497 <https://issues.jboss.org/browse/ISPN-4497>
   - ISPN-4777 <https://issues.jboss.org/browse/ISPN-4777>


After a long period of stability, we've still found rare problems, relating
to when applications are shutdown. I don't need to go into the details here.

We've now decided rather than trying to fix the problems we would enhance
the DistributedSegmentReadLocker to prevent unwarranted file deletes. The
mechanism is quite simple, in that when the directory really wants a file
deleted we would add an additional marker to the cache and then proceed
with a real delete only if this marker is present. You can see the changes
here:
https://github.com/anujshahwork/infinispan/commit/a31e93cee452549e8820f7247a79396de0312f83


Would appreciate feedback on this idea and whether we should create a
feature request along with pull request.

Thanks

Anuj Shah
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20150818/3265b2f8/attachment.html 


More information about the infinispan-dev mailing list