[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: split-brain between live and backup node
jmesnil
do-not-reply at jboss.com
Wed Feb 11 09:35:35 EST 2009
from #jbossmessaging channel http://www.antwerkz.com/javabot/javabot/home/3/%23jbossmessaging/2/11/1/02/0/2009/:
| [14:33] jbossfox: i solved the problem
| [14:33] jbossfox: jmesnil: it's a combination of a few things
| [14:33] jbossfox: jmesnil: firstly - the issue i explained on the forums
| [14:33] jbossfox: jmesnil: when the client fails over
| [14:33] jbossfox: jmesnil: this results in the backup server closing the replicating connection from the live server
| [14:34] jbossfox: jmesnil: but this closure forces a ConectionDestroyed, not ConectionException
| [14:34] jbossfox: jmesnil: in NoCacheConnectionLifeCycleListener
| [14:34] jbossfox: jmesnil: so the replicating channel is never set to null
| [14:34] jbossfox: jmesnil: basically like i explained on the forums
| [14:34] jbossfox: jmesnil: but on top of that
| [14:35] jbossfox: jmesnil: there was a bug where the replicatingconnection wasn't being set to null
| [14:35] jbossfox: jmesnil: only the replicating channel
| [14:35] jbossfox: jmesnil: so subsequent createsession attempts would attempt to replicate still
| [14:35] jbossfox: jmesnil: and hang
| [14:35] jmesnil: jbossfox: ah, ok, that's where the replicating channel was coming from
| [14:35] jbossfox: jmesnil: yeah it was creating a new connection to the backup
| [14:35] jbossfox: jmesnil: and then...
| [14:36] jbossfox: jmesnil: a further bug
| [14:36] jbossfox: jmesnil: where the server still thinks it has a backup
| [14:36] jbossfox: jmesnil: even after the replicating connection fails
| [14:36] jbossfox: jmesnil: so when getreplicatingconnection is called it creates a new one
| [14:36] jbossfox: jmesnil: so i set backupconnectorFactory to null in this case
| [14:36] jbossfox: jmesnil: then.....
| [14:37] jbossfox: jmesnil: there is a further interesting quirk
| [14:37] jbossfox: jmesnil: if backupconnectorfactory is not null then when getreplicatingconnection is called it will create a new connection
| [14:37] jbossfox: jmesnil: so it was basically just creating a new backup connection to the backup
| [14:37] jbossfox: jmesnil: and then....
| [14:38] jbossfox: jmesnil: when you create a new consumer on the live, you've got to remember the old server side consumer from before client failove is still there!
| [14:38] jbossfox: jmesnil: so any messages will be round robin'd between them
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4209069#4209069
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4209069
More information about the jboss-dev-forums
mailing list