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.kuusk...@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-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to