Fisherman110 opened a new pull request, #941:
URL: https://github.com/apache/tomcat/pull/941

   # The original proposal   [Bug 
62432](https://bz.apache.org/bugzilla/show_bug.cgi?id=62432)
   
   The StatementFinalizer keeps a list of statements which he closes
   if they're still open when the connection is closed. The list keeps
   weak references to the statements, so when the statement is closed
   by client code, it can be garbage collected and will not be closed
   by the StatementFinalizer.
   
   However, the StatementFinalizer keeps the references to the Statements
   indirectly through instances of StatementFinalizer$StatementEntry.
   These instances are not cleaned up even when the statements they refer
   to have long been closed. Mostly this does not seem to be a problem when
   connections are closed quickly.
   
   But we have had long running jobs that created many Statements with
   the same connection where the instances of (empty) 
   StatementFinalizer$StatementEntry finally brought the VM to its knees.
   
   The useless instances of StatementFinalizer$StatementEntry kept
   around in the statement list constitute a memory leak in my opinion.
   
   # What's new?
   
   A new feature to address the memory  leak for StatementFinalizer$statements.
   When a new Statement is created, it invokes the function called 
clearEntry(). 
   The clearEntry function will clean those invalid (null or have been closed)  
   StatementEntry instances in the list every ten times.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to