[JBoss JIRA] Updated: (JBMESSAGING-355) Remove possibility of delivery race conditions
by Ovidiu Feodorov (JIRA)
[ http://jira.jboss.com/jira/browse/JBMESSAGING-355?page=all ]
Ovidiu Feodorov updated JBMESSAGING-355:
----------------------------------------
Fix Version/s: 1.2.1
(was: 1.0.3)
> Remove possibility of delivery race conditions
> ----------------------------------------------
>
> Key: JBMESSAGING-355
> URL: http://jira.jboss.com/jira/browse/JBMESSAGING-355
> Project: JBoss Messaging
> Issue Type: Task
> Reporter: Tim Fox
> Assigned To: Tim Fox
> Fix For: 1.2.1
>
> Original Estimate: 3 days
> Remaining Estimate: 3 days
>
> Currently race conditions can occur on message delivery where the delivery is acknowledged or cancelled before the call to handle has returned.
> In ChannelState we defensively program against this by synchronizing on the returned delivery and by dealing with the situation where the delivery does not exist in the channel state and ignoring.
> See ChannelSupport::deliver() and ChannelState.cancelDelivery.
> This approach has the following problems:
> Complexity of code to maintain and understand.
> Where acks return quickly we are likely to get contention on the lock in ChannelSupport::deliver, thus reducing throughput.
> A much simpler solution enables us to remove the possibility of such race conditions and remove the corresponding lock contention.
> This can be done by adding a confirm() method on Delivery.
> When the receiver receives the message in it's handle() call, before dispatching the message it calls Delivery::confirm. This results in the channel adding the delivery to the channel state. Thus we can be assured that the delivery exists before any acknowledgment or cancellation comes in.
> This is a very simple change.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 10 months
[JBoss JIRA] Updated: (JBMESSAGING-312) De-monolithise persistencemanager
by Ovidiu Feodorov (JIRA)
[ http://jira.jboss.com/jira/browse/JBMESSAGING-312?page=all ]
Ovidiu Feodorov updated JBMESSAGING-312:
----------------------------------------
Fix Version/s: 1.2.1
(was: 1.0.3)
> De-monolithise persistencemanager
> ---------------------------------
>
> Key: JBMESSAGING-312
> URL: http://jira.jboss.com/jira/browse/JBMESSAGING-312
> Project: JBoss Messaging
> Issue Type: Task
> Reporter: Tim Fox
> Assigned To: Tim Fox
> Fix For: 1.2.1
>
> Original Estimate: 4 days
> Remaining Estimate: 4 days
>
> Refactor PersistenceManager to make less monolithic.
> The PersistenceManager should really only deal with simple persistence operations, e..g. addReference, removeReference, addMessage, removeMessage etc. This makes it easy to re-implement for another type of store.
> Currently the PM contains logic that belongs elsewhere e.g. in the ChannelState.
> The TransactionCallback should be removed to it's own java file.
> The locking operations should occur in the caller.
> There should be an abstraction PMTxContext which can be passed into PM operations to group them.
> This should dramatically clarify and simplify things
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 10 months