[Yanel-dev] problem re-starting Yanel containing a realm with
search lock
Josias Thöny
josias.thoeny at wyona.com
Mon May 19 14:44:11 CEST 2008
Michael Wechner wrote:
> Josias Thöny wrote:
[...]
>
>> That's why I changed the behaviour to have only one IndexWriter which
>> is closed when the repository is shut down.
>
>
> where exactly did you change this? Within the configure/init and
> shutdown methods of Yarep? Is this Yarep repo implementation specific?
It's specific to the VFS implementation, and the changes are in r36400
and in r36520, concerning these files:
public/yarep/trunk/src/impl/java/org/wyona/yarep/impl/repo/vfs/VirtualFileSystemNode.java
public/yarep/trunk/src/impl/java/org/wyona/yarep/impl/repo/vfs/VirtualFileSystemOutputStream.java
public/yarep/trunk/src/impl/java/org/wyona/yarep/impl/repo/vfs/VirtualFileSystemRepository.java
>
>> Now I realize that this doesn't work in a cluster. Doh!
>
>
> right, but it's very important that this works within a clustered
> environment
>
>> Maybe there should be a special clustered yarep implementation which
>> performs some synchronization. I think it should not be required for
>> all yarep implementations to be clusterable, because it can add a lot
>> of complexity
>
>
> maybe we can hide the complexity
>
>> and adds a performance penalty.
>
>
> You mean because initializing an IndexWriter is bad for performance? I
I guess so, although I didn't do any profiling.
> would argue the cluster improves the peformance in the end/long run, so
> that being able to cluster is more important than having a performance
> gain for a single node.
>
> Well, how can we fix this? At the moment we have the problem, that all
> our clustered solutions do not work anymore
I think it concerns the clustered repos which use vfs and use indexing.
> and I would like to fix this
> as quick as possible. At the same time you are saying that one receives
> a LockObtainFailedExceptions when multiple threads are trying to write.
> I am sure there is some way that we can fix both problems.
I had a closer look at the lucene implementation. It seems that when
it's trying to obtain the write lock, it actually tries multiple times
until a timeout occurs. The default timeout is 1 second.
Maybe we can revert to the old way, increase the timeout, and
catch&ignore the LockObtainFailedException.
I hope this should fix the problems, or WDYT?
josias
>
> Any idea?
>
> Thanks
>
> Michi
>
>>
>> Josias
>>
>> [1]
>> http://lucene.apache.org/java/2_2_0/api/org/apache/lucene/index/IndexWriter.html
>>
>>
>>>
>>>> Maybe with a finalize() method of the IdentityManager/PolicyManager?
>>>>
>>>> BTW, why is indexing enabled for the res-config repository of the
>>>> yanel-website realm?
>>>
>>>
>>>
>>> no, it would make sense to disable this.
>>>
>>> Cheers
>>>
>>> Michi
>>>
>>>>
>>>> josias
>>>>
>>>>>
>>>>> Also maybe
>>>>> http://www.manning-sandbox.com/message.jspa?messageID=39279 helps
>>>>>
>>>>> Thanks
>>>>>
>>>>> Michi
>>>>>
>>>>
>>>> _______________________________________________
>>>> Yanel-development mailing list
>>>> Yanel-development at wyona.com
>>>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>>>
>>>
>>>
>>>
>>
>> _______________________________________________
>> Yanel-development mailing list
>> Yanel-development at wyona.com
>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>
>
>
More information about the Yanel-development
mailing list