You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Kenneth Giusti <kg...@apache.org> on 2013/01/22 19:25:12 UTC

Review Request: C++ Broker: fix to allow deletion of federation links regardless of connection state.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9055/
-----------------------------------------------------------

Review request for qpid, Andrew Stitcher and Ted Ross.


Description
-------

Fixes a bug that prevents deletion of a Link when the corresponding connection is not in the active state.


This addresses bug qpid-4546.
    https://issues.apache.org/jira/browse/qpid-4546


Diffs
-----

  /trunk/qpid/cpp/src/qpid/broker/Link.h 1436517 
  /trunk/qpid/cpp/src/qpid/broker/Link.cpp 1436517 

Diff: https://reviews.apache.org/r/9055/diff/


Testing
-------

Federation unit tests + tested deleting links that were disconnected and in connection state.


Thanks,

Kenneth Giusti


Re: Review Request: C++ Broker: fix to allow deletion of federation links regardless of connection state.

Posted by Andrew Stitcher <as...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9055/#review15585
-----------------------------------------------------------

Ship it!


- Andrew Stitcher


On Jan. 22, 2013, 9:10 p.m., Kenneth Giusti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9055/
> -----------------------------------------------------------
> 
> (Updated Jan. 22, 2013, 9:10 p.m.)
> 
> 
> Review request for qpid, Andrew Stitcher and Ted Ross.
> 
> 
> Description
> -------
> 
> Fixes a bug that prevents deletion of a Link when the corresponding connection is not in the active state.
> 
> 
> This addresses bug qpid-4546.
>     https://issues.apache.org/jira/browse/qpid-4546
> 
> 
> Diffs
> -----
> 
>   /trunk/qpid/cpp/src/qpid/broker/Link.h 1436517 
>   /trunk/qpid/cpp/src/qpid/broker/Link.cpp 1436517 
>   /trunk/qpid/cpp/src/tests/CMakeLists.txt 1436517 
> 
> Diff: https://reviews.apache.org/r/9055/diff/
> 
> 
> Testing
> -------
> 
> Federation unit tests + tested deleting links that were disconnected and in connection state.
> 
> 
> Thanks,
> 
> Kenneth Giusti
> 
>


Re: Review Request: C++ Broker: fix to allow deletion of federation links regardless of connection state.

Posted by Alan Conway <ac...@redhat.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9055/#review15626
-----------------------------------------------------------


Looks good, but I still don't see where the problem would be with HA on 0.18.


/trunk/qpid/cpp/src/qpid/broker/Link.cpp
<https://reviews.apache.org/r/9055/#comment33720>

    what if we get a closed call while !STATE_CLOSING? Don't we still want to destroy?



/trunk/qpid/cpp/src/qpid/broker/Link.cpp
<https://reviews.apache.org/r/9055/#comment33722>

    Style: should be destroyNow
    



/trunk/qpid/cpp/src/qpid/broker/Link.cpp
<https://reviews.apache.org/r/9055/#comment33721>

    Style: should be oldState


- Alan Conway


On Jan. 22, 2013, 9:10 p.m., Kenneth Giusti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9055/
> -----------------------------------------------------------
> 
> (Updated Jan. 22, 2013, 9:10 p.m.)
> 
> 
> Review request for qpid, Andrew Stitcher and Ted Ross.
> 
> 
> Description
> -------
> 
> Fixes a bug that prevents deletion of a Link when the corresponding connection is not in the active state.
> 
> 
> This addresses bug qpid-4546.
>     https://issues.apache.org/jira/browse/qpid-4546
> 
> 
> Diffs
> -----
> 
>   /trunk/qpid/cpp/src/qpid/broker/Link.h 1436517 
>   /trunk/qpid/cpp/src/qpid/broker/Link.cpp 1436517 
>   /trunk/qpid/cpp/src/tests/CMakeLists.txt 1436517 
> 
> Diff: https://reviews.apache.org/r/9055/diff/
> 
> 
> Testing
> -------
> 
> Federation unit tests + tested deleting links that were disconnected and in connection state.
> 
> 
> Thanks,
> 
> Kenneth Giusti
> 
>


Re: Review Request: C++ Broker: fix to allow deletion of federation links regardless of connection state.

Posted by Kenneth Giusti <kg...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9055/
-----------------------------------------------------------

(Updated Jan. 22, 2013, 9:10 p.m.)


Review request for qpid, Andrew Stitcher and Ted Ross.


Changes
-------

Incorporate review input.


Description
-------

Fixes a bug that prevents deletion of a Link when the corresponding connection is not in the active state.


This addresses bug qpid-4546.
    https://issues.apache.org/jira/browse/qpid-4546


Diffs (updated)
-----

  /trunk/qpid/cpp/src/qpid/broker/Link.h 1436517 
  /trunk/qpid/cpp/src/qpid/broker/Link.cpp 1436517 
  /trunk/qpid/cpp/src/tests/CMakeLists.txt 1436517 

Diff: https://reviews.apache.org/r/9055/diff/


Testing
-------

Federation unit tests + tested deleting links that were disconnected and in connection state.


Thanks,

Kenneth Giusti


Re: Review Request: C++ Broker: fix to allow deletion of federation links regardless of connection state.

Posted by Kenneth Giusti <kg...@apache.org>.

> On Jan. 22, 2013, 6:40 p.m., Andrew Stitcher wrote:
> > /trunk/qpid/cpp/src/qpid/broker/Link.cpp, line 494
> > <https://reviews.apache.org/r/9055/diff/1/?file=251026#file251026line494>
> >
> >     There appears to be no substitute for this test perhaps should be:
> >         if (state == STATE_CLOSING) return;
> >     
> >     Perhaps it doesn't matter except as a shortcut return.

Right - since the body only executes if state is operational or state is waiting, the extra check wasn't really necessary.  But I'll change it to a switch statement to make that more clear.


> On Jan. 22, 2013, 6:40 p.m., Andrew Stitcher wrote:
> > /trunk/qpid/cpp/src/qpid/broker/Link.cpp, line 495
> > <https://reviews.apache.org/r/9055/diff/1/?file=251026#file251026line495>
> >
> >     perhaps the entire "if (state ==" chain should be replaced with a "switch ... case" type of construct to make the state machine design more plain.

Agreed - a switch will clarify the intent, I'll fix that.


- Kenneth


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9055/#review15574
-----------------------------------------------------------


On Jan. 22, 2013, 6:25 p.m., Kenneth Giusti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9055/
> -----------------------------------------------------------
> 
> (Updated Jan. 22, 2013, 6:25 p.m.)
> 
> 
> Review request for qpid, Andrew Stitcher and Ted Ross.
> 
> 
> Description
> -------
> 
> Fixes a bug that prevents deletion of a Link when the corresponding connection is not in the active state.
> 
> 
> This addresses bug qpid-4546.
>     https://issues.apache.org/jira/browse/qpid-4546
> 
> 
> Diffs
> -----
> 
>   /trunk/qpid/cpp/src/qpid/broker/Link.h 1436517 
>   /trunk/qpid/cpp/src/qpid/broker/Link.cpp 1436517 
> 
> Diff: https://reviews.apache.org/r/9055/diff/
> 
> 
> Testing
> -------
> 
> Federation unit tests + tested deleting links that were disconnected and in connection state.
> 
> 
> Thanks,
> 
> Kenneth Giusti
> 
>


Re: Review Request: C++ Broker: fix to allow deletion of federation links regardless of connection state.

Posted by Andrew Stitcher <as...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9055/#review15574
-----------------------------------------------------------

Ship it!


Whilst this is a little messy I'm happy for it to ship although I'd be happier if you attend to the issues below.


/trunk/qpid/cpp/src/qpid/broker/Link.cpp
<https://reviews.apache.org/r/9055/#comment33653>

    There appears to be no substitute for this test perhaps should be:
        if (state == STATE_CLOSING) return;
    
    Perhaps it doesn't matter except as a shortcut return.



/trunk/qpid/cpp/src/qpid/broker/Link.cpp
<https://reviews.apache.org/r/9055/#comment33654>

    perhaps the entire "if (state ==" chain should be replaced with a "switch ... case" type of construct to make the state machine design more plain.



/trunk/qpid/cpp/src/qpid/broker/Link.cpp
<https://reviews.apache.org/r/9055/#comment33652>

    I think this change has no effect - that is the new code has precisely the same effect as the old.


- Andrew Stitcher


On Jan. 22, 2013, 6:25 p.m., Kenneth Giusti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/9055/
> -----------------------------------------------------------
> 
> (Updated Jan. 22, 2013, 6:25 p.m.)
> 
> 
> Review request for qpid, Andrew Stitcher and Ted Ross.
> 
> 
> Description
> -------
> 
> Fixes a bug that prevents deletion of a Link when the corresponding connection is not in the active state.
> 
> 
> This addresses bug qpid-4546.
>     https://issues.apache.org/jira/browse/qpid-4546
> 
> 
> Diffs
> -----
> 
>   /trunk/qpid/cpp/src/qpid/broker/Link.h 1436517 
>   /trunk/qpid/cpp/src/qpid/broker/Link.cpp 1436517 
> 
> Diff: https://reviews.apache.org/r/9055/diff/
> 
> 
> Testing
> -------
> 
> Federation unit tests + tested deleting links that were disconnected and in connection state.
> 
> 
> Thanks,
> 
> Kenneth Giusti
> 
>