On Wed, Jan 30, 2013 at 4:46 PM, Peter Karman <[email protected]> wrote: > Should I be implementing a try/catch pattern on that open(), sleeping some > time between attempts?
Yes. Additionally, consider calling PolyReader#open (undocumented but available) rather than IndexReader#open, because otherwise a small amount of memory will leak each time PolyReader_open() fails. > Is that my only option? Right now, that is your only option. Looking forward, one way to address this problem is to create a DeletionPolicy class which modifies the behavior of FilePurger; we can then create custom DeletionPolicy subclasses which e.g. allow obsolete index files to accumulate for an extra 60 seconds. I think that would allow us to outright remove the deletion lock code from PolyReader_open() and to provide a modified recommendation to people putting indexes on NFS. (: But concurrency is hard so don't assume I'm 100% right. :) Marvin Humphrey
