You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Alan Conway <ac...@redhat.com> on 2011/04/19 19:23:42 UTC

Re: Review Request: QPID-3215: cached exchange reference can cause cluster inconsistencies if exchange is deleted/recreated

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

(Updated 2011-04-19 17:23:42.488669)


Review request for qpid and Gordon Sim.


Summary
-------

QPID-3215: cached exchange reference can cause cluster inconsistencies if exchange is deleted/recreated

SemanticState::route() uses a simple cache variable to avoid looking
up the exchange for every message. However if the exchange in question
is deleted, even if then recreated, this can cause inconsistencies in
a cluster.

Even in a stand-alone broker messages can be routed by a deleted
exchange because of the cache.

Fix is to mark the exchange deleted and check the status when using
the cached exchange.


Diffs
-----

  /trunk/qpid/cpp/src/qpid/broker/Exchange.h 1095059 
  /trunk/qpid/cpp/src/qpid/broker/Exchange.cpp 1095059 
  /trunk/qpid/cpp/src/qpid/broker/ExchangeRegistry.cpp 1095059 
  /trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp 1095059 
  /trunk/qpid/cpp/src/tests/cluster_tests.py 1095059 

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


Testing
-------


Thanks,

Alan


Re: Review Request: QPID-3215: cached exchange reference can cause cluster inconsistencies if exchange is deleted/recreated

Posted by "Weston M. Price" <wp...@redhat.com>.
+1 

Well done under fire. 

Weston
On Apr 19, 2011, at 1:29 PM, Gordon Sim wrote:

> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/623/#review496
> -----------------------------------------------------------
> 
> Ship it!
> 
> 
> Nice fix; thanks!
> 
> - Gordon
> 
> 
> On 2011-04-19 17:23:42, Alan Conway wrote:
>> 
>> -----------------------------------------------------------
>> This is an automatically generated e-mail. To reply, visit:
>> https://reviews.apache.org/r/623/
>> -----------------------------------------------------------
>> 
>> (Updated 2011-04-19 17:23:42)
>> 
>> 
>> Review request for qpid and Gordon Sim.
>> 
>> 
>> Summary
>> -------
>> 
>> QPID-3215: cached exchange reference can cause cluster inconsistencies if exchange is deleted/recreated
>> 
>> SemanticState::route() uses a simple cache variable to avoid looking
>> up the exchange for every message. However if the exchange in question
>> is deleted, even if then recreated, this can cause inconsistencies in
>> a cluster.
>> 
>> Even in a stand-alone broker messages can be routed by a deleted
>> exchange because of the cache.
>> 
>> Fix is to mark the exchange deleted and check the status when using
>> the cached exchange.
>> 
>> 
>> Diffs
>> -----
>> 
>>  /trunk/qpid/cpp/src/qpid/broker/Exchange.h 1095059 
>>  /trunk/qpid/cpp/src/qpid/broker/Exchange.cpp 1095059 
>>  /trunk/qpid/cpp/src/qpid/broker/ExchangeRegistry.cpp 1095059 
>>  /trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp 1095059 
>>  /trunk/qpid/cpp/src/tests/cluster_tests.py 1095059 
>> 
>> Diff: https://reviews.apache.org/r/623/diff
>> 
>> 
>> Testing
>> -------
>> 
>> 
>> Thanks,
>> 
>> Alan
>> 
>> 
> 


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


Re: Review Request: QPID-3215: cached exchange reference can cause cluster inconsistencies if exchange is deleted/recreated

Posted by Gordon Sim <gs...@redhat.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/623/#review496
-----------------------------------------------------------

Ship it!


Nice fix; thanks!

- Gordon


On 2011-04-19 17:23:42, Alan Conway wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/623/
> -----------------------------------------------------------
> 
> (Updated 2011-04-19 17:23:42)
> 
> 
> Review request for qpid and Gordon Sim.
> 
> 
> Summary
> -------
> 
> QPID-3215: cached exchange reference can cause cluster inconsistencies if exchange is deleted/recreated
> 
> SemanticState::route() uses a simple cache variable to avoid looking
> up the exchange for every message. However if the exchange in question
> is deleted, even if then recreated, this can cause inconsistencies in
> a cluster.
> 
> Even in a stand-alone broker messages can be routed by a deleted
> exchange because of the cache.
> 
> Fix is to mark the exchange deleted and check the status when using
> the cached exchange.
> 
> 
> Diffs
> -----
> 
>   /trunk/qpid/cpp/src/qpid/broker/Exchange.h 1095059 
>   /trunk/qpid/cpp/src/qpid/broker/Exchange.cpp 1095059 
>   /trunk/qpid/cpp/src/qpid/broker/ExchangeRegistry.cpp 1095059 
>   /trunk/qpid/cpp/src/qpid/broker/SemanticState.cpp 1095059 
>   /trunk/qpid/cpp/src/tests/cluster_tests.py 1095059 
> 
> Diff: https://reviews.apache.org/r/623/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Alan
> 
>