You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Boris Pruessmann (Created) (JIRA)" <ji...@apache.org> on 2011/11/15 12:40:51 UTC

[jira] [Created] (JCR-3148) Using transactions still leads to memory leak

Using transactions still leads to memory leak
---------------------------------------------

                 Key: JCR-3148
                 URL: https://issues.apache.org/jira/browse/JCR-3148
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: transactions
    Affects Versions: 2.2.5
            Reporter: Boris Pruessmann


This is a result of the way that JCR-395 was fixed. If you look at the code, you'll see that txGlobal.remove(xid) is called as the last statement in both XASessionImpl.commit() and XASessionImpl.rollback(). However, in both methods an exception could be thrown either as a result of calling tx.commit() (or tx.prepare()) and tx.rollback(). 

As a result, the transaction will not be removed from txGlobals whenever the commit or the rollback has failed for any reason. My suggestion would be to move the txGlobal.remove(xid) into a finally block.

--
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] (JCR-3148) Using transactions still leads to memory leak

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

Boris Pruessmann updated JCR-3148:
----------------------------------

    Comment: was deleted

(was: Moved txGlobals.remove(xid) into finally block)
    
> Using transactions still leads to memory leak
> ---------------------------------------------
>
>                 Key: JCR-3148
>                 URL: https://issues.apache.org/jira/browse/JCR-3148
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: transactions
>    Affects Versions: 2.2.5
>            Reporter: Boris Pruessmann
>
> This is a result of the way that JCR-395 was fixed. If you look at the code, you'll see that txGlobal.remove(xid) is called as the last statement in both XASessionImpl.commit() and XASessionImpl.rollback(). However, in both methods an exception could be thrown either as a result of calling tx.commit() (or tx.prepare()) and tx.rollback(). 
> As a result, the transaction will not be removed from txGlobals whenever the commit or the rollback has failed for any reason. My suggestion would be to move the txGlobal.remove(xid) into a finally block.

--
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] (JCR-3148) Using transactions still leads to memory leak

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

Boris Pruessmann updated JCR-3148:
----------------------------------

    Status: Patch Available  (was: Open)

Moved txGlobals.remove(xid) into finally block
                
> Using transactions still leads to memory leak
> ---------------------------------------------
>
>                 Key: JCR-3148
>                 URL: https://issues.apache.org/jira/browse/JCR-3148
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: transactions
>    Affects Versions: 2.2.5
>            Reporter: Boris Pruessmann
>
> This is a result of the way that JCR-395 was fixed. If you look at the code, you'll see that txGlobal.remove(xid) is called as the last statement in both XASessionImpl.commit() and XASessionImpl.rollback(). However, in both methods an exception could be thrown either as a result of calling tx.commit() (or tx.prepare()) and tx.rollback(). 
> As a result, the transaction will not be removed from txGlobals whenever the commit or the rollback has failed for any reason. My suggestion would be to move the txGlobal.remove(xid) into a finally block.

--
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] (JCR-3148) Using transactions still leads to memory leak

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

Boris Pruessmann updated JCR-3148:
----------------------------------

    Attachment: XASessionImpl.patch

Moved txGlobals.remove(xid) into finally block
                
> Using transactions still leads to memory leak
> ---------------------------------------------
>
>                 Key: JCR-3148
>                 URL: https://issues.apache.org/jira/browse/JCR-3148
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: transactions
>    Affects Versions: 2.2.5
>            Reporter: Boris Pruessmann
>         Attachments: XASessionImpl.patch
>
>
> This is a result of the way that JCR-395 was fixed. If you look at the code, you'll see that txGlobal.remove(xid) is called as the last statement in both XASessionImpl.commit() and XASessionImpl.rollback(). However, in both methods an exception could be thrown either as a result of calling tx.commit() (or tx.prepare()) and tx.rollback(). 
> As a result, the transaction will not be removed from txGlobals whenever the commit or the rollback has failed for any reason. My suggestion would be to move the txGlobal.remove(xid) into a finally block.

--
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] (JCR-3148) Using transactions still leads to memory leak

Posted by "Claus Köll (Commented JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13150412#comment-13150412 ] 

Claus Köll commented on JCR-3148:
---------------------------------

thanks for the patch. commited patch in rev. 1202144
If you need it in the 2.2 branch please comment on this issue
                
> Using transactions still leads to memory leak
> ---------------------------------------------
>
>                 Key: JCR-3148
>                 URL: https://issues.apache.org/jira/browse/JCR-3148
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: transactions
>    Affects Versions: 2.2.5
>            Reporter: Boris Pruessmann
>            Assignee: Claus Köll
>             Fix For: 2.3.4
>
>         Attachments: XASessionImpl.patch
>
>
> This is a result of the way that JCR-395 was fixed. If you look at the code, you'll see that txGlobal.remove(xid) is called as the last statement in both XASessionImpl.commit() and XASessionImpl.rollback(). However, in both methods an exception could be thrown either as a result of calling tx.commit() (or tx.prepare()) and tx.rollback(). 
> As a result, the transaction will not be removed from txGlobals whenever the commit or the rollback has failed for any reason. My suggestion would be to move the txGlobal.remove(xid) into a finally block.

--
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] (JCR-3148) Using transactions still leads to memory leak

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

Boris Pruessmann updated JCR-3148:
----------------------------------

    Status: Patch Available  (was: Open)

Attached patch file
                
> Using transactions still leads to memory leak
> ---------------------------------------------
>
>                 Key: JCR-3148
>                 URL: https://issues.apache.org/jira/browse/JCR-3148
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: transactions
>    Affects Versions: 2.2.5
>            Reporter: Boris Pruessmann
>         Attachments: XASessionImpl.patch
>
>
> This is a result of the way that JCR-395 was fixed. If you look at the code, you'll see that txGlobal.remove(xid) is called as the last statement in both XASessionImpl.commit() and XASessionImpl.rollback(). However, in both methods an exception could be thrown either as a result of calling tx.commit() (or tx.prepare()) and tx.rollback(). 
> As a result, the transaction will not be removed from txGlobals whenever the commit or the rollback has failed for any reason. My suggestion would be to move the txGlobal.remove(xid) into a finally block.

--
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] (JCR-3148) Using transactions still leads to memory leak

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

Boris Pruessmann updated JCR-3148:
----------------------------------

    Status: Open  (was: Patch Available)
    
> Using transactions still leads to memory leak
> ---------------------------------------------
>
>                 Key: JCR-3148
>                 URL: https://issues.apache.org/jira/browse/JCR-3148
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: transactions
>    Affects Versions: 2.2.5
>            Reporter: Boris Pruessmann
>
> This is a result of the way that JCR-395 was fixed. If you look at the code, you'll see that txGlobal.remove(xid) is called as the last statement in both XASessionImpl.commit() and XASessionImpl.rollback(). However, in both methods an exception could be thrown either as a result of calling tx.commit() (or tx.prepare()) and tx.rollback(). 
> As a result, the transaction will not be removed from txGlobals whenever the commit or the rollback has failed for any reason. My suggestion would be to move the txGlobal.remove(xid) into a finally block.

--
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] (JCR-3148) Using transactions still leads to memory leak

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

Claus Köll updated JCR-3148:
----------------------------

    Fix Version/s: 2.3.4
    
> Using transactions still leads to memory leak
> ---------------------------------------------
>
>                 Key: JCR-3148
>                 URL: https://issues.apache.org/jira/browse/JCR-3148
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: transactions
>    Affects Versions: 2.2.5
>            Reporter: Boris Pruessmann
>            Assignee: Claus Köll
>             Fix For: 2.3.4
>
>         Attachments: XASessionImpl.patch
>
>
> This is a result of the way that JCR-395 was fixed. If you look at the code, you'll see that txGlobal.remove(xid) is called as the last statement in both XASessionImpl.commit() and XASessionImpl.rollback(). However, in both methods an exception could be thrown either as a result of calling tx.commit() (or tx.prepare()) and tx.rollback(). 
> As a result, the transaction will not be removed from txGlobals whenever the commit or the rollback has failed for any reason. My suggestion would be to move the txGlobal.remove(xid) into a finally block.

--
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] (JCR-3148) Using transactions still leads to memory leak

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

Claus Köll updated JCR-3148:
----------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)
    
> Using transactions still leads to memory leak
> ---------------------------------------------
>
>                 Key: JCR-3148
>                 URL: https://issues.apache.org/jira/browse/JCR-3148
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: transactions
>    Affects Versions: 2.2.5
>            Reporter: Boris Pruessmann
>            Assignee: Claus Köll
>             Fix For: 2.3.4
>
>         Attachments: XASessionImpl.patch
>
>
> This is a result of the way that JCR-395 was fixed. If you look at the code, you'll see that txGlobal.remove(xid) is called as the last statement in both XASessionImpl.commit() and XASessionImpl.rollback(). However, in both methods an exception could be thrown either as a result of calling tx.commit() (or tx.prepare()) and tx.rollback(). 
> As a result, the transaction will not be removed from txGlobals whenever the commit or the rollback has failed for any reason. My suggestion would be to move the txGlobal.remove(xid) into a finally block.

--
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] (JCR-3148) Using transactions still leads to memory leak

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

Jukka Zitting updated JCR-3148:
-------------------------------

    Fix Version/s: 2.2.11

Merged to the 2.2 branch in revision 1235755.
                
> Using transactions still leads to memory leak
> ---------------------------------------------
>
>                 Key: JCR-3148
>                 URL: https://issues.apache.org/jira/browse/JCR-3148
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: transactions
>    Affects Versions: 2.2.5
>            Reporter: Boris Pruessmann
>            Assignee: Claus Köll
>             Fix For: 2.2.11, 2.3.4
>
>         Attachments: XASessionImpl.patch
>
>
> This is a result of the way that JCR-395 was fixed. If you look at the code, you'll see that txGlobal.remove(xid) is called as the last statement in both XASessionImpl.commit() and XASessionImpl.rollback(). However, in both methods an exception could be thrown either as a result of calling tx.commit() (or tx.prepare()) and tx.rollback(). 
> As a result, the transaction will not be removed from txGlobals whenever the commit or the rollback has failed for any reason. My suggestion would be to move the txGlobal.remove(xid) into a finally block.

--
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] (JCR-3148) Using transactions still leads to memory leak

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

Boris Pruessmann updated JCR-3148:
----------------------------------

    Comment: was deleted

(was: Attached patch file)
    
> Using transactions still leads to memory leak
> ---------------------------------------------
>
>                 Key: JCR-3148
>                 URL: https://issues.apache.org/jira/browse/JCR-3148
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: transactions
>    Affects Versions: 2.2.5
>            Reporter: Boris Pruessmann
>         Attachments: XASessionImpl.patch
>
>
> This is a result of the way that JCR-395 was fixed. If you look at the code, you'll see that txGlobal.remove(xid) is called as the last statement in both XASessionImpl.commit() and XASessionImpl.rollback(). However, in both methods an exception could be thrown either as a result of calling tx.commit() (or tx.prepare()) and tx.rollback(). 
> As a result, the transaction will not be removed from txGlobals whenever the commit or the rollback has failed for any reason. My suggestion would be to move the txGlobal.remove(xid) into a finally block.

--
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] (JCR-3148) Using transactions still leads to memory leak

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

Claus Köll reassigned JCR-3148:
-------------------------------

    Assignee: Claus Köll
    
> Using transactions still leads to memory leak
> ---------------------------------------------
>
>                 Key: JCR-3148
>                 URL: https://issues.apache.org/jira/browse/JCR-3148
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: transactions
>    Affects Versions: 2.2.5
>            Reporter: Boris Pruessmann
>            Assignee: Claus Köll
>             Fix For: 2.3.4
>
>         Attachments: XASessionImpl.patch
>
>
> This is a result of the way that JCR-395 was fixed. If you look at the code, you'll see that txGlobal.remove(xid) is called as the last statement in both XASessionImpl.commit() and XASessionImpl.rollback(). However, in both methods an exception could be thrown either as a result of calling tx.commit() (or tx.prepare()) and tx.rollback(). 
> As a result, the transaction will not be removed from txGlobals whenever the commit or the rollback has failed for any reason. My suggestion would be to move the txGlobal.remove(xid) into a finally block.

--
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