Is it safe to delete ferret-write.lck if it is stale?

I’m noticing that ferret-write.lck sometimes stays in my index
directory and throws exceptions whenever someone tries to do a search.
Apparently there are some cases where ferret doesn’t realize that the
file is old and can be deleted. I’m wondering what the best way to
recover from this error is. Am I safe just writing a cron job that
deletes this file if it is over 10 minutes old or something? Is there
any additional cleanup that I need to do?

Thanks!

Carl

Hi Carl,

I don’t think this is a good idea. If the lock file is still open then
there are probably changes that still need to be written to the index.
Instead we should try and work out why this is happening. If you could
somehow write a failing test I’m sure I’ll be able to fix this.

Cheers,
Dave

I’ll work on trying to reproduce it. I should also mention that I’m
running the pure ruby version of ferret since the C one doesn’t
compile on freebsd yet.