[ 
https://issues.apache.org/jira/browse/QPID-3304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13048631#comment-13048631
 ] 

[email protected] commented on QPID-3304:
-----------------------------------------------------


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



/trunk/qpid/cpp/src/qpid/broker/Message.h
<https://reviews.apache.org/r/888/#comment1775>

    Would it make more sense to pass the lock in?


- Andy


On 2011-06-13 11:57:23, Gordon Sim wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/888/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-06-13 11:57:23)
bq.  
bq.  
bq.  Review request for Kim van der Riet, Ted Ross and Steve Huston.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  QPID-3304 is essentially a knock-on effect of the rather nasty fix made 
for QPID-2670. The original problem is that the headers were being modified in 
some cases after the header body was made available for delivery. This meant 
that concurrent delivery and modification could cause seg faults.
bq.  
bq.  This patch attempts to solve that original problem more cleanly. The 
essential points of the patch are these:
bq.  
bq.  * prevent access to modifiable header frame outside of message; have 
explicit modifying methods on the message class itself where correct locking 
can be used. (One exception here is that the message class still allows direct 
access to the underlying frames, currently used only in management and 
clustering as far as I can tell, both of which are safe by inspection).
bq.  
bq.  * remove the copy-on-write in the queue when adding trace id (i.e. revert 
previous fix to QPID-2670 that caused QPID-3304).
bq.  
bq.  * have the copy-on-write pattern encapsulated in the message class itself. 
I.e. when the frame containing a pointer to the header body has been written, 
make sure subsequent modifications happen to a clone of that body (as the body 
may still be in use in delivering the frames to a connection).
bq.  
bq.  There are then a few fixes in tests to use the new message scoped 
modifiers rather than manipulating the header external to the message class. 
These fixes may also be needed in store specific tests.
bq.  
bq.  
bq.  This addresses bug QPID-3304.
bq.      https://issues.apache.org/jira/browse/QPID-3304
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    /trunk/qpid/cpp/src/qpid/broker/DeliveryRecord.cpp 1130102 
bq.    /trunk/qpid/cpp/src/qpid/broker/Exchange.cpp 1130102 
bq.    /trunk/qpid/cpp/src/qpid/broker/Message.h 1130102 
bq.    /trunk/qpid/cpp/src/qpid/broker/Message.cpp 1131084 
bq.    /trunk/qpid/cpp/src/qpid/broker/Queue.cpp 1130102 
bq.    /trunk/qpid/cpp/src/qpid/framing/AMQFrame.h 1130102 
bq.    /trunk/qpid/cpp/src/qpid/framing/AMQFrame.cpp 1130102 
bq.    /trunk/qpid/cpp/src/qpid/management/ManagementAgent.cpp 1130102 
bq.    /trunk/qpid/cpp/src/qpid/replication/ReplicatingEventListener.cpp 
1130102 
bq.    /trunk/qpid/cpp/src/qpid/replication/ReplicationExchange.cpp 1130102 
bq.    /trunk/qpid/cpp/src/tests/ExchangeTest.cpp 1130102 
bq.    /trunk/qpid/cpp/src/tests/QueueTest.cpp 1130102 
bq.    /trunk/qpid/cpp/src/tests/TxPublishTest.cpp 1130102 
bq.  
bq.  Diff: https://reviews.apache.org/r/888/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Make check passes
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Gordon
bq.  
bq.



> Tagged federation messages in a transaction can cause subsequent dequeue to 
> fail
> --------------------------------------------------------------------------------
>
>                 Key: QPID-3304
>                 URL: https://issues.apache.org/jira/browse/QPID-3304
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Broker
>    Affects Versions: 0.10
>            Reporter: Gordon Sim
>             Fix For: 0.11
>
>
> E.g. with Error dequeuing message, persistence id not set 
> (MessageStoreImpl.cpp:1355) (exact error depends on store used).
> To reproduce, bind a durable queue to an exchange with a given binding key 
> the set up a route between that same exchange on two brokers with the 'source 
> broker' being the one with the durable queue bound to it. Then bind a queue 
> on the 'destination' broker with the same binding key as used for the durable 
> queue. Then publish a transactional message to the source brokers exchange 
> with a matching routing key. The message will be enqueued on both the durable 
> queue and the federation routes temporary bridge queue. However the 
> persistence id for the message, set when enqueueing on the durable queue is 
> lost and subsequent attempts to dequeue to fail.
> The problem is that the copy-on-write strategy used to workaround QPID-2670 
> means that the message on which the persistent store id is set is not then 
> pushed onto the appropriate queues, the copy is (and the copy may not have 
> the persistence id set on it). 

--
This message is automatically generated by JIRA.
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:[email protected]

Reply via email to