Hi all,
I’ve got a slight problem with using Ferret in unit tests. In order to
create as little cross-contamination between test suites as possible,
some of my tests are creating a fresh index per test case, and then
calling Index#close and deleting the containing dir during the teardown.
The problem comes when GC.start kicks in after the deleting the
directory:
IOError: IO Error occured at <except.c>:79 in xraise
Error occured in fs_store.c:146 - fs_clear_locks
clearing locks in persistence_path/00000000001:
The persistence_path/ directory is the one that was File.rm_r’d. How
can I stop this from happening? Is it a bug, or have I messed something
up? This worked with 0.9.5, but doesn’t now that I’ve updated to
0.10.6. Any clues?
On 9/22/06, Alex Y. [email protected] wrote:
clearing locks in persistence_path/00000000001: <No such file
or directory>
The persistence_path/ directory is the one that was File.rm_r’d. How
can I stop this from happening? Is it a bug, or have I messed something
up? This worked with 0.9.5, but doesn’t now that I’ve updated to
0.10.6. Any clues?
–
Alex
Hi Alex,
This is a bug which I’m fixing right now. If you open any
FSDirectories then you must close them too before you rm_f the index
dir. Unfortunately FSDirectory#close doesn’t currently work and the
Index class doesn’t call it either so try 0.10.7 when I release it.
Cheers,
Dave
David B. wrote:
Error occured in fs_store.c:146 - fs_clear_locks
Hi Alex,
This is a bug which I’m fixing right now. If you open any
FSDirectories then you must close them too before you rm_f the index
dir. Unfortunately FSDirectory#close doesn’t currently work and the
Index class doesn’t call it either so try 0.10.7 when I release it.
Ah, ok. It’s not actually affecting live code, it just makes a mess of
my tests as it stands.
Keep up the good work
Has this been resolved? I’m still getting this problem on the latest
Ferret. Is there any way around this problem?
Thanks Ray
Alex Y. wrote:
David B. wrote:
Error occured in fs_store.c:146 - fs_clear_locks
Hi Alex,
This is a bug which I’m fixing right now. If you open any
FSDirectories then you must close them too before you rm_f the index
dir. Unfortunately FSDirectory#close doesn’t currently work and the
Index class doesn’t call it either so try 0.10.7 when I release it.
Ah, ok. It’s not actually affecting live code, it just makes a mess of
my tests as it stands.
Keep up the good work
On 2/23/07, Raymond O’connor [email protected] wrote:
Has this been resolved? I’m still getting this problem on the latest
Ferret. Is there any way around this problem?
Thanks Ray
Hi Ray,
This problem (below) has been fixed in the current working copy of
Ferret. I would still recommend explicitly closing your index and
creating a new index. Deleting the directory shouldn’t be necessary
but if will be safe to do it in the next release.
Cheers,
Dave