[Design of Messaging on JBoss (Messaging/JBoss)] - Re: XA Recovery on Journal...
by timfox
"adrian(a)jboss.org" wrote :
| Returning "read only" would be the most optimal thing to do.
| You then don't record the prepare in the journal.
|
| However, once you do that the non-peristent message should be removed from memory
| or anywhere else you reference it.
|
The problem with returning RD_ONLY as I see it, is that if I have a tx branch with a bunch of non persistent sends, and return RD_ONLY then commit will never get called, so those messages won't ever get routed in memory to its subscribers (since routing occurs on commit)
One other possibility is to return OK, but not actually persist the branch if it only contains non persistent operations, then if we subsequently get a commit or rollback for that branch on recovery, we can return OK to the commit/rollback even though we can't find the branch. The tx mgr then thinks the transaction was resolved ok, even though the non persistent messages were lost (which is fine anyway).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175052#4175052
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4175052
17 years, 7 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: XA Recovery on Journal...
by adrian@jboss.org
"timfox" wrote : Ah no. We only return RD_ONLY if there the tx is completely empty, including non persistent operations, so yes I think we need to record a blank tx branch in the journal.
Returning "read only" would be the most optimal thing to do.
You then don't record the prepare in the journal.
However, once you do that the non-peristent message should be removed from memory
or anywhere else you reference it.
If you return "read only" you won't get the commit/rollback notification.
That obviously means non-persistent messages won't get redelivered
once they've tried to be prepared in a 2PC transaction, even if the eventual
outcome of the transaction is a rollback.
That is perfectly spec compliant though since there's no guarantee
the message would get delivered in the first place, let alone redelivered after a rollback. :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175047#4175047
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4175047
17 years, 7 months