You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2013/02/07 13:36:48 UTC

[Bug 54537] New: StatementFinalizer closeInvoked is too slow for large batch jobs.

https://issues.apache.org/bugzilla/show_bug.cgi?id=54537

            Bug ID: 54537
           Summary: StatementFinalizer closeInvoked is too slow for large
                    batch jobs.
           Product: Tomcat Modules
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: critical
          Priority: P2
         Component: jdbc-pool
          Assignee: dev@tomcat.apache.org
          Reporter: kristo.kuuskull@nortal.com
    Classification: Unclassified

We had a transaction with 6 million statements. In the end of transaction
org.apache.tomcat.jdbc.pool.interceptor.closeInvoked was called and it ran for
couple of hours before we terminated it.

The problem is that code below is basically O(n^2) and takes too much time with
large amount of statements.

Solution: use more suitable Collection type for statements or change the cycle
logic (for i=...).

while (this.statements.size() > 0) {
      WeakReference ws = (WeakReference)this.statements.remove(0)

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 54537] StatementFinalizer closeInvoked is too slow for large batch jobs.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54537

--- Comment #1 from Filip Hanik <fh...@apache.org> ---
Ok, so if we used a linked list, it should be O(n)

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 54537] StatementFinalizer closeInvoked is too slow for large batch jobs.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54537

Filip Hanik <fh...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Filip Hanik <fh...@apache.org> ---
Fixed in r1616602

-- 
You are receiving this mail because:
You are the assignee for the bug.

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