You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Keith Wall (Created) (JIRA)" <ji...@apache.org> on 2012/02/22 16:55:49 UTC

[jira] [Created] (QPID-3867) AMQQueueMBean#clearQueue|moveMessages|copyMessages should be certain to rollback transactions in the event of exception

AMQQueueMBean#clearQueue|moveMessages|copyMessages should be certain to rollback transactions in the event of exception
-----------------------------------------------------------------------------------------------------------------------

                 Key: QPID-3867
                 URL: https://issues.apache.org/jira/browse/QPID-3867
             Project: Qpid
          Issue Type: Bug
          Components: Java Broker
    Affects Versions: 0.15
            Reporter: Keith Wall
            Assignee: Keith Wall
            Priority: Critical


AMQQueueMBean#clearQueue|moveMessages|copyMessages all leave open that possibility that a LocalTransaction goes uncommitted (or unrolledback) in the event of exception.

This will lead to uncontrolled store growth when used with BDB as would block the action of the cleaner thread.

A finally block should be used to ensure that transaction is rolled back on any exception.
 



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

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3867) AMQQueueMBean#clearQueue|moveMessages|copyMessages should be certain to rollback transactions in the event of exception

Posted by "Robbie Gemmell (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13217556#comment-13217556 ] 

Robbie Gemmell commented on QPID-3867:
--------------------------------------

I can agree with that...but yes, seperate JIRA :)
                
> AMQQueueMBean#clearQueue|moveMessages|copyMessages should be certain to rollback transactions in the event of exception
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3867
>                 URL: https://issues.apache.org/jira/browse/QPID-3867
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.15
>            Reporter: Keith Wall
>            Assignee: Robbie Gemmell
>            Priority: Critical
>
> AMQQueueMBean#clearQueue|moveMessages|copyMessages all leave open that possibility that a LocalTransaction goes uncommitted (or unrolledback) in the event of exception.
> This will lead to uncontrolled store growth when used with BDB as would block the action of the cleaner thread.
> A finally block should be used to ensure that transaction is rolled back on any exception.
>  

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

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Updated] (QPID-3867) AMQQueueMBean#clearQueue|moveMessages|copyMessages should be certain to rollback transactions in the event of exception

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

Keith Wall updated QPID-3867:
-----------------------------

    Status: Ready To Review  (was: In Progress)
    
> AMQQueueMBean#clearQueue|moveMessages|copyMessages should be certain to rollback transactions in the event of exception
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3867
>                 URL: https://issues.apache.org/jira/browse/QPID-3867
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.15
>            Reporter: Keith Wall
>            Assignee: Keith Wall
>            Priority: Critical
>
> AMQQueueMBean#clearQueue|moveMessages|copyMessages all leave open that possibility that a LocalTransaction goes uncommitted (or unrolledback) in the event of exception.
> This will lead to uncontrolled store growth when used with BDB as would block the action of the cleaner thread.
> A finally block should be used to ensure that transaction is rolled back on any exception.
>  

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

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Assigned] (QPID-3867) AMQQueueMBean#clearQueue|moveMessages|copyMessages should be certain to rollback transactions in the event of exception

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

Keith Wall reassigned QPID-3867:
--------------------------------

    Assignee: Robbie Gemmell  (was: Keith Wall)

Hi Robbie, can you review this commit please?
                
> AMQQueueMBean#clearQueue|moveMessages|copyMessages should be certain to rollback transactions in the event of exception
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3867
>                 URL: https://issues.apache.org/jira/browse/QPID-3867
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.15
>            Reporter: Keith Wall
>            Assignee: Robbie Gemmell
>            Priority: Critical
>
> AMQQueueMBean#clearQueue|moveMessages|copyMessages all leave open that possibility that a LocalTransaction goes uncommitted (or unrolledback) in the event of exception.
> This will lead to uncontrolled store growth when used with BDB as would block the action of the cleaner thread.
> A finally block should be used to ensure that transaction is rolled back on any exception.
>  

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

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3867) AMQQueueMBean#clearQueue|moveMessages|copyMessages should be certain to rollback transactions in the event of exception

Posted by "Robbie Gemmell (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216959#comment-13216959 ] 

Robbie Gemmell commented on QPID-3867:
--------------------------------------

My only reservation is around the queue depth checking in the tests, I think its possible that will sporadically fail on certain slower CI instances due to the commit response going back before the in-memory enqueue is completed.

Im not too fussed about the queue parameter. The problem with doing that would be that the MBean would then need to be the one doing the lookup so that it could provide the AMQQueue object, which isnt really any nicer since it would be good if the management layer was as dumb-as-a-brick where possible and AMQQueueMBean is already an example of where its not.
                
> AMQQueueMBean#clearQueue|moveMessages|copyMessages should be certain to rollback transactions in the event of exception
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3867
>                 URL: https://issues.apache.org/jira/browse/QPID-3867
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.15
>            Reporter: Keith Wall
>            Assignee: Robbie Gemmell
>            Priority: Critical
>
> AMQQueueMBean#clearQueue|moveMessages|copyMessages all leave open that possibility that a LocalTransaction goes uncommitted (or unrolledback) in the event of exception.
> This will lead to uncontrolled store growth when used with BDB as would block the action of the cleaner thread.
> A finally block should be used to ensure that transaction is rolled back on any exception.
>  

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

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3867) AMQQueueMBean#clearQueue|moveMessages|copyMessages should be certain to rollback transactions in the event of exception

Posted by "Rob Godfrey (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216958#comment-13216958 ] 

Rob Godfrey commented on QPID-3867:
-----------------------------------

One small comment from me:

Since we're changing the interface on AMQQueue anyway, I would suggest it would be nicer for the move/copy to take the destination queue as an AMQQueue rather than as a string which needs to be looked up.  Obviously the methods still need to check that the passed queue != this, and that the queue is on the same vhost.  

Not a blocker by any means, rest of the patch looked good to me.
                
> AMQQueueMBean#clearQueue|moveMessages|copyMessages should be certain to rollback transactions in the event of exception
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3867
>                 URL: https://issues.apache.org/jira/browse/QPID-3867
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.15
>            Reporter: Keith Wall
>            Assignee: Robbie Gemmell
>            Priority: Critical
>
> AMQQueueMBean#clearQueue|moveMessages|copyMessages all leave open that possibility that a LocalTransaction goes uncommitted (or unrolledback) in the event of exception.
> This will lead to uncontrolled store growth when used with BDB as would block the action of the cleaner thread.
> A finally block should be used to ensure that transaction is rolled back on any exception.
>  

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

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3867) AMQQueueMBean#clearQueue|moveMessages|copyMessages should be certain to rollback transactions in the event of exception

Posted by "Rob Godfrey (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13216965#comment-13216965 ] 

Rob Godfrey commented on QPID-3867:
-----------------------------------

I guess my issue is that the API on AMQQueue feels fairly "unnatural"... it's clearly bolted on to support a particular function of the MBean rather than naturally being something the Queue would expose, and we should probably be doing our best to simplify AMQQueue. 

In that sense I feel like actually the functionality should be moved into a third-party class (including the management of the transaction). The API on AMQQueue should potentially just be the ability to acquire a set of messages matching a filter. In that sense I think the change to make the subject queue manage the transaction is suspect.

This is possibly worth a separate JIRA though.
                
> AMQQueueMBean#clearQueue|moveMessages|copyMessages should be certain to rollback transactions in the event of exception
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3867
>                 URL: https://issues.apache.org/jira/browse/QPID-3867
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.15
>            Reporter: Keith Wall
>            Assignee: Robbie Gemmell
>            Priority: Critical
>
> AMQQueueMBean#clearQueue|moveMessages|copyMessages all leave open that possibility that a LocalTransaction goes uncommitted (or unrolledback) in the event of exception.
> This will lead to uncontrolled store growth when used with BDB as would block the action of the cleaner thread.
> A finally block should be used to ensure that transaction is rolled back on any exception.
>  

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

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Resolved] (QPID-3867) AMQQueueMBean#clearQueue|moveMessages|copyMessages should be certain to rollback transactions in the event of exception

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

Robbie Gemmell resolved QPID-3867.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 0.15

I'm just closing this out. If the queue depth check ever starts being a problem im happy that its an easy NO-JIRA fix.
                
> AMQQueueMBean#clearQueue|moveMessages|copyMessages should be certain to rollback transactions in the event of exception
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-3867
>                 URL: https://issues.apache.org/jira/browse/QPID-3867
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.15
>            Reporter: Keith Wall
>            Assignee: Robbie Gemmell
>            Priority: Critical
>             Fix For: 0.15
>
>
> AMQQueueMBean#clearQueue|moveMessages|copyMessages all leave open that possibility that a LocalTransaction goes uncommitted (or unrolledback) in the event of exception.
> This will lead to uncontrolled store growth when used with BDB as would block the action of the cleaner thread.
> A finally block should be used to ensure that transaction is rolled back on any exception.
>  

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

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org