You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Michael Wechner <mi...@wyona.com> on 2005/03/11 00:29:05 UTC

synchronizing all methods within DefaultSiteTree of 1.2

Hi

I have just checked in the patch of Felix Roethenbacher:

http://issues.apache.org/bugzilla/show_bug.cgi?id=33908

which should resolve some issues we had with a screwed sitetree of
the default publication.

As there any reason why not all methods have been synchronized in the 
first place?

Thanks

Michi

-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: synchronizing all methods within DefaultSiteTree of 1.2

Posted by Michael Wechner <mi...@wyona.com>.
Felix Röthenbacher wrote:

>>
>> I am not sure if this is the right explanation, but it seems that the 
>> sitetree is now
>> stable under "heavy" load.
>
>
> Not quite right: the problem is that all access (read and write) to a
> DOM needs to be synchronized, otherwise the DOM get corrupt (Xerces
> issue).


good to know

Thanks

Michi

-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: synchronizing all methods within DefaultSiteTree of 1.2

Posted by Felix Röthenbacher <fe...@wyona.com>.
Michael Wechner wrote:
> Gregor J. Rothfuss wrote:
> 
>> Michael Wechner wrote:
>>
>>> Hi
>>>
>>> I have just checked in the patch of Felix Roethenbacher:
>>>
>>> http://issues.apache.org/bugzilla/show_bug.cgi?id=33908
>>>
>>> which should resolve some issues we had with a screwed sitetree of
>>> the default publication.
>>>
>>> As there any reason why not all methods have been synchronized in the 
>>> first place?
>>
>>
>>
>> read-only methods were not synchronized i believe.
> 
> 
> 
> I guess they need to be synchronized as well, because if something is 
> being changed
> and at the same time something is being read it could happen that the 
> reading process
> might not get what it should.
> 
> I am not sure if this is the right explanation, but it seems that the 
> sitetree is now
> stable under "heavy" load.

Not quite right: the problem is that all access (read and write) to a
DOM needs to be synchronized, otherwise the DOM get corrupt (Xerces
issue).

> 
> Thanks
> 
> Michi
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: synchronizing all methods within DefaultSiteTree of 1.2

Posted by Michael Wechner <mi...@wyona.com>.
Gregor J. Rothfuss wrote:

> Michael Wechner wrote:
>
>> Hi
>>
>> I have just checked in the patch of Felix Roethenbacher:
>>
>> http://issues.apache.org/bugzilla/show_bug.cgi?id=33908
>>
>> which should resolve some issues we had with a screwed sitetree of
>> the default publication.
>>
>> As there any reason why not all methods have been synchronized in the 
>> first place?
>
>
> read-only methods were not synchronized i believe.


I guess they need to be synchronized as well, because if something is 
being changed
and at the same time something is being read it could happen that the 
reading process
might not get what it should.

I am not sure if this is the right explanation, but it seems that the 
sitetree is now
stable under "heavy" load.

Thanks

Michi

>
>


-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: synchronizing all methods within DefaultSiteTree of 1.2

Posted by "Gregor J. Rothfuss" <gr...@apache.org>.
Michael Wechner wrote:
> Hi
> 
> I have just checked in the patch of Felix Roethenbacher:
> 
> http://issues.apache.org/bugzilla/show_bug.cgi?id=33908
> 
> which should resolve some issues we had with a screwed sitetree of
> the default publication.
> 
> As there any reason why not all methods have been synchronized in the 
> first place?

read-only methods were not synchronized i believe.


-- 
Gregor J. Rothfuss
COO, Wyona       Content Management Solutions    http://wyona.com
Apache Lenya                              http://lenya.apache.org
gregor.rothfuss@wyona.com                       gregor@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: synchronizing all methods within DefaultSiteTree of 1.2

Posted by Jann Forrer <ja...@id.unizh.ch>.
On Thu, 17 Mar 2005, Michael Wechner wrote:

> Jann Forrer wrote:
>
> >On Fri, 11 Mar 2005, Michael Wechner wrote:
> >
> >
> >
> >>Hi
> >>
> >>I have just checked in the patch of Felix Roethenbacher:
> >>
> >>http://issues.apache.org/bugzilla/show_bug.cgi?id=33908
> >>
> >>which should resolve some issues we had with a screwed sitetree of
> >>the default publication.
> >>
> >>As there any reason why not all methods have been synchronized in the
> >>first place?
> >>
> >>
> >>
> >
> >I did a loadtest with one of our publication using JMeter with the old and
> >the new (synchronized) version of the DefaultSiteTree class and as expected
> >the synchronized Version works much better :-)
> >
> >However we still get errors testing the publication (see stack trace
> >example below). This is probably due to the same problems with Xerces and
> >dom as described in Bug  33908. Do you plan to synchronize all methods
> >accessing the DOM within lenya?
> >
> >
>
> did we forget to synchronize other ones? Would you be interested to
> submit a patch ;-) ?
>

I might misunderstand something but what about e.g.
o.a.l.cms.publication.SiteTreeNodeImpl which also use DOM?

Jann

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: synchronizing all methods within DefaultSiteTree of 1.2

Posted by Michael Wechner <mi...@wyona.com>.
Jann Forrer wrote:

>On Fri, 11 Mar 2005, Michael Wechner wrote:
>
>  
>
>>Hi
>>
>>I have just checked in the patch of Felix Roethenbacher:
>>
>>http://issues.apache.org/bugzilla/show_bug.cgi?id=33908
>>
>>which should resolve some issues we had with a screwed sitetree of
>>the default publication.
>>
>>As there any reason why not all methods have been synchronized in the
>>first place?
>>
>>    
>>
>
>I did a loadtest with one of our publication using JMeter with the old and
>the new (synchronized) version of the DefaultSiteTree class and as expected
>the synchronized Version works much better :-)
>
>However we still get errors testing the publication (see stack trace
>example below). This is probably due to the same problems with Xerces and
>dom as described in Bug  33908. Do you plan to synchronize all methods
>accessing the DOM within lenya?
>  
>

did we forget to synchronize other ones? Would you be interested to
submit a patch ;-) ?

Thanks

Michi

-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org


Re: synchronizing all methods within DefaultSiteTree of 1.2

Posted by Jann Forrer <ja...@id.unizh.ch>.
On Fri, 11 Mar 2005, Michael Wechner wrote:

> Hi
>
> I have just checked in the patch of Felix Roethenbacher:
>
> http://issues.apache.org/bugzilla/show_bug.cgi?id=33908
>
> which should resolve some issues we had with a screwed sitetree of
> the default publication.
>
> As there any reason why not all methods have been synchronized in the
> first place?
>

I did a loadtest with one of our publication using JMeter with the old and
the new (synchronized) version of the DefaultSiteTree class and as expected
the synchronized Version works much better :-)

However we still get errors testing the publication (see stack trace
example below). This is probably due to the same problems with Xerces and
dom as described in Bug  33908. Do you plan to synchronize all methods
accessing the DOM within lenya?

Jann

---- error message from JMeter

org.apache.cocoon.ProcessingException: Error executing pipeline.:
java.lang.NullPointerException
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.handleException(AbstractProcessingPipeline.java:825)
	at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:270)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:701)
	at
org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:415)
	at
org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:264)
	at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:117)
[.....]
Caused by: java.lang.NullPointerException
	at
org.apache.lenya.cms.cocoon.transformation.LinkRewritingTransformer.startElement(LinkRewritingTransformer.java:237)
	at
org.apache.cocoon.components.sax.XMLTeePipe.startElement(XMLTeePipe.java:83)
	at
org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XMLByteStreamInterpreter.java:97)
	at
org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserialize(XMLByteStreamInterpreter.java:73)
	at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:222)
	... 77 more

java.lang.NullPointerException
	at
org.apache.lenya.cms.cocoon.transformation.LinkRewritingTransformer.startElement(LinkRewritingTransformer.java:237)
	at
org.apache.cocoon.components.sax.XMLTeePipe.startElement(XMLTeePipe.java:83)
	at
org.apache.cocoon.components.sax.XMLByteStreamInterpreter.parse(XMLByteStreamInterpreter.java:97)
	at
org.apache.cocoon.components.sax.XMLByteStreamInterpreter.deserialize(XMLByteStreamInterpreter.java:73)
	at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:222)

[....]


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org