2010/8/11 Kostka Bořivoj <kos...@tovek.cz>:
>> For the patch of the RAMFile desctructor I'm in doubt. Looking at the 
>> correspondong
>> JLucene classes subtracting the file size is done in the deleteFile method of
>> RAMDirectory (see diff).
>>
>> By the way, I needed some inline keywords removed in _RAMDirectory.h.
>> Otherwise, I couldn't compile it with gcc on FreeBSD.
>
> I agree, it is better to do this in deleteFile than in RAMFile destructor.
> The only thing I'm not sure about is the mutex used for sync - files_mutex
> is used in deleteFile.
> Shouldn't it be RAMDirectory's THIS_LOCK?

Maybe. But every other method manipulating the files map is using the
files_mutex also.

>> > 2)     MockRAMDirectory::close always throws an exception because
>> > segments.gen is in list of open files, no idea if this is a bug in
>> > RAMDirectory or MockRAMDirectory
>>
>> Why do you use MockRAMDirectory here? I ported this class from JLucene, 
>> because I
>> needed once a directory implementation that intentionally throws exceptions. 
>> And
>> because the close-methods of RAMDirectory and MockRAMDirectory are identical 
>> to
>> the JLucene methods, I'd say that's neither a bug of RAMDirectory nor
>> MockRAMDirectory.
>
> I use MockRAMDirectory just because it is used in original java test I 
> ported. It is used
> in many tests in test/index folder so I wanted to test MockRAMDirectory 
> itself before
> using it in other tests.

You are right. Something is odd there. I will take a close look tomorrow.

Veit

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
CLucene-developers mailing list
CLucene-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/clucene-developers

Reply via email to