[Design of Clustering on JBoss (Clusters/JBoss)] - HASingleton and partition merges
by bstansberry@jboss.com
Discussion related to http://jira.jboss.com/jira/browse/JBAS-4229.
The way a clustered service is aware that a 'split brain' situation has occurred and is now healed is by receiving a MergeView from JGroups. Problem here is that HASingletonSupport does not receive view change notifications from JGroups -- it receives service topology change notifications from DistributedReplicantManager. (The topology of a service can change for reasons other than view changes; e.g. undeploy of the service on a node.) The topology change notification does not include any information as to whether the change was due to a merge.
In 4.x this can be somewhat shakily resolved by having the topology change callback do some extra work to try to figure out from HAPartition whether a MergeView has occurred. That is, register with the HAPartition for membership change events and track whether they are due to merges.
I say shakily resolved because the topology change notifications and the view change notifications come on separate threads with no guaranteed ordering. If numerous events are received in short order, the potential to have mis-correlation between topology changes and view changes certainly exists.
In 5.x a cleaner solution is possible, since in a major version I can change the DRM.replicantListener interface. I can add a boolean flag to the callback so the DRM can directly notify the singleton that the change was due to a merge.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030370#4030370
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030370
19 years
[Design of Messaging on JBoss (Messaging/JBoss)] - Failure on RemotingConnectionConfigurationTest::testConnecti
by clebert.suconic@jboss.com
After updating Remoting, this test is failling...
The test is calling callbackConnectors.get(callbackHandler) and this HashMap operation is retuning a HashSet while it used to return a Connector.
| Connector connector = Connector)callbackConnectors.get(callbackHandler);
|
I don't know if the API changed... if this test is now invalid... or what?
I would need to get some input on this... as i didn't authored the test I don't know what's this is supposed to return.
Ron, Tom Elrod?
This is a more complete snippet of the failing test:
if ("socket".equals(transport)
| || "sslsocket".equals(transport)
| || "bisocket".equals(transport)
| || "sslbisocket".equals(transport))
| {
| field = Client.class.getDeclaredField("callbackConnectors");
| field.setAccessible(true);
| Map callbackConnectors = (Map)field.get(client);
|
| InvokerCallbackHandler callbackHandler = remotingConnection.getCallbackManager();
| Connector connector = (Connector)callbackConnectors.get(callbackHandler);
| locator = new InvokerLocator(connector.getInvokerLocator());
| assertEquals(address, locator.getHost());
| assertEquals(freePort, locator.getPort());
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4030354#4030354
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4030354
19 years