You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Nick Heudecker (Created) (JIRA)" <ji...@apache.org> on 2012/02/13 07:50:59 UTC

[jira] [Created] (CAMEL-5002) BaseTypeConverter blocks when getting type converter

BaseTypeConverter blocks when getting type converter
----------------------------------------------------

                 Key: CAMEL-5002
                 URL: https://issues.apache.org/jira/browse/CAMEL-5002
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 2.9.0
            Reporter: Nick Heudecker


When load testing my application, BaseTypeConverter#getOrFindTypeConverter caused threads to block due to the synchronized block in the getOrFindTypeConverter method.  This was triggered when exchange.getIn().getBody(Class) was called.  Changing the method to getBody() resulted in higher application throughput.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-5002) BaseTypeConverter blocks when getting type converter

Posted by "Willem Jiang (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13207744#comment-13207744 ] 

Willem Jiang commented on CAMEL-5002:
-------------------------------------

Hi Nick,

I just checked the code of camel-2.9.x , there is no BaseTypeConveter.
Can  you double check the version of camel ?
BTW, a patch could be more precise to discrib the question.

Willem
                
> BaseTypeConverter blocks when getting type converter
> ----------------------------------------------------
>
>                 Key: CAMEL-5002
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5002
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Nick Heudecker
>            Assignee: Willem Jiang
>
> When load testing my application, BaseTypeConverter#getOrFindTypeConverter caused threads to block due to the synchronized block in the getOrFindTypeConverter method.  This was triggered when exchange.getIn().getBody(Class) was called.  Changing the method to getBody() resulted in higher application throughput.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-5002) BaseTypeConverter blocks when getting type converter

Posted by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13208557#comment-13208557 ] 

Claus Ibsen commented on CAMEL-5002:
------------------------------------

Its the BaseTypeConverterRegistry.

I have reproduced the issue and using a profiler I can see the contention.
                
> BaseTypeConverter blocks when getting type converter
> ----------------------------------------------------
>
>                 Key: CAMEL-5002
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5002
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Nick Heudecker
>            Assignee: Willem Jiang
>
> When load testing my application, BaseTypeConverter#getOrFindTypeConverter caused threads to block due to the synchronized block in the getOrFindTypeConverter method.  This was triggered when exchange.getIn().getBody(Class) was called.  Changing the method to getBody() resulted in higher application throughput.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-5002) BaseTypeConverter blocks when getting type converter

Posted by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13209431#comment-13209431 ] 

Claus Ibsen commented on CAMEL-5002:
------------------------------------

I have committed a fix for the test.
                
> BaseTypeConverter blocks when getting type converter
> ----------------------------------------------------
>
>                 Key: CAMEL-5002
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5002
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Nick Heudecker
>            Assignee: Claus Ibsen
>             Fix For: 2.9.1, 2.10.0
>
>         Attachments: after.png, before.png
>
>
> When load testing my application, BaseTypeConverter#getOrFindTypeConverter caused threads to block due to the synchronized block in the getOrFindTypeConverter method.  This was triggered when exchange.getIn().getBody(Class) was called.  Changing the method to getBody() resulted in higher application throughput.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CAMEL-5002) BaseTypeConverter blocks when getting type converter

Posted by "Claus Ibsen (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-5002:
----------------------------------

    Assignee: Claus Ibsen  (was: Willem Jiang)
    
> BaseTypeConverter blocks when getting type converter
> ----------------------------------------------------
>
>                 Key: CAMEL-5002
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5002
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Nick Heudecker
>            Assignee: Claus Ibsen
>
> When load testing my application, BaseTypeConverter#getOrFindTypeConverter caused threads to block due to the synchronized block in the getOrFindTypeConverter method.  This was triggered when exchange.getIn().getBody(Class) was called.  Changing the method to getBody() resulted in higher application throughput.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-5002) BaseTypeConverter blocks when getting type converter

Posted by "Babak Vahdat (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13209441#comment-13209441 ] 

Babak Vahdat commented on CAMEL-5002:
-------------------------------------

Thanks!

And +1 for CAMEL-5011
                
> BaseTypeConverter blocks when getting type converter
> ----------------------------------------------------
>
>                 Key: CAMEL-5002
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5002
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Nick Heudecker
>            Assignee: Claus Ibsen
>             Fix For: 2.9.1, 2.10.0
>
>         Attachments: after.png, before.png
>
>
> When load testing my application, BaseTypeConverter#getOrFindTypeConverter caused threads to block due to the synchronized block in the getOrFindTypeConverter method.  This was triggered when exchange.getIn().getBody(Class) was called.  Changing the method to getBody() resulted in higher application throughput.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-5002) BaseTypeConverter blocks when getting type converter

Posted by "Babak Vahdat (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13209421#comment-13209421 ] 

Babak Vahdat commented on CAMEL-5002:
-------------------------------------

The fix provided by this ticket has broken regression:

https://builds.apache.org/job/Camel.trunk.fulltest/org.apache.camel$camel-xmlbeans/698/testReport/junit/org.apache.camel.converter.xmlbeans/XmlBeansConcurrencyTest/testConcurrentProducers/

If you would revert BaseTypeConverterRegistry to what it was before (with synchronized blocks) then this test would pass. I'm looking into it but have not found a workround yet.
                
> BaseTypeConverter blocks when getting type converter
> ----------------------------------------------------
>
>                 Key: CAMEL-5002
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5002
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Nick Heudecker
>            Assignee: Claus Ibsen
>             Fix For: 2.9.1, 2.10.0
>
>         Attachments: after.png, before.png
>
>
> When load testing my application, BaseTypeConverter#getOrFindTypeConverter caused threads to block due to the synchronized block in the getOrFindTypeConverter method.  This was triggered when exchange.getIn().getBody(Class) was called.  Changing the method to getBody() resulted in higher application throughput.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-5002) BaseTypeConverter blocks when getting type converter

Posted by "Claus Ibsen (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-5002:
-------------------------------

    Attachment: after.png
                before.png

Before and after screenshots with the fix.
                
> BaseTypeConverter blocks when getting type converter
> ----------------------------------------------------
>
>                 Key: CAMEL-5002
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5002
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Nick Heudecker
>            Assignee: Claus Ibsen
>         Attachments: after.png, before.png
>
>
> When load testing my application, BaseTypeConverter#getOrFindTypeConverter caused threads to block due to the synchronized block in the getOrFindTypeConverter method.  This was triggered when exchange.getIn().getBody(Class) was called.  Changing the method to getBody() resulted in higher application throughput.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-5002) BaseTypeConverter blocks when getting type converter

Posted by "Claus Ibsen (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13209454#comment-13209454 ] 

Claus Ibsen commented on CAMEL-5002:
------------------------------------

Just in case, there may be another component where we should enforce the TC to be loaded up-front. I just did a quick search for tests with similar name.

./components/camel-rmi/src/test/java/org/apache/camel/component/rmi/RmiConcurrencyTest.java
./components/camel-saxon/src/test/java/org/apache/camel/component/xquery/XQueryConcurrencyTest.java
./components/camel-saxon/src/test/java/org/apache/camel/component/xquery/XQueryURLBasedConcurrencyTest.java
./components/camel-xmlbeans/src/test/java/org/apache/camel/converter/xmlbeans/XmlBeansConcurrencyTest.java
./components/camel-xmlsecurity/src/test/java/org/apache/camel/dataformat/xmlsecurity/XMLSecurityConcurrencyTest.java
./components/camel-xstream/src/test/java/org/apache/camel/dataformat/xstream/XStreamConcurrencyTest.java
                
> BaseTypeConverter blocks when getting type converter
> ----------------------------------------------------
>
>                 Key: CAMEL-5002
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5002
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Nick Heudecker
>            Assignee: Claus Ibsen
>             Fix For: 2.9.1, 2.10.0
>
>         Attachments: after.png, before.png
>
>
> When load testing my application, BaseTypeConverter#getOrFindTypeConverter caused threads to block due to the synchronized block in the getOrFindTypeConverter method.  This was triggered when exchange.getIn().getBody(Class) was called.  Changing the method to getBody() resulted in higher application throughput.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-5002) BaseTypeConverter blocks when getting type converter

Posted by "Claus Ibsen (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-5002.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.10.0
                   2.9.1
    
> BaseTypeConverter blocks when getting type converter
> ----------------------------------------------------
>
>                 Key: CAMEL-5002
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5002
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Nick Heudecker
>            Assignee: Claus Ibsen
>             Fix For: 2.9.1, 2.10.0
>
>         Attachments: after.png, before.png
>
>
> When load testing my application, BaseTypeConverter#getOrFindTypeConverter caused threads to block due to the synchronized block in the getOrFindTypeConverter method.  This was triggered when exchange.getIn().getBody(Class) was called.  Changing the method to getBody() resulted in higher application throughput.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CAMEL-5002) BaseTypeConverter blocks when getting type converter

Posted by "Willem Jiang (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CAMEL-5002?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang reassigned CAMEL-5002:
-----------------------------------

    Assignee: Willem Jiang
    
> BaseTypeConverter blocks when getting type converter
> ----------------------------------------------------
>
>                 Key: CAMEL-5002
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5002
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.9.0
>            Reporter: Nick Heudecker
>            Assignee: Willem Jiang
>
> When load testing my application, BaseTypeConverter#getOrFindTypeConverter caused threads to block due to the synchronized block in the getOrFindTypeConverter method.  This was triggered when exchange.getIn().getBody(Class) was called.  Changing the method to getBody() resulted in higher application throughput.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira