[
http://jira.jboss.com/jira/browse/JGRP-375?page=comments#action_12395426 ]
Vladimir Blagojevic commented on JGRP-375:
------------------------------------------
Can we put this one in 2.6.2 as well? It is a very simple feature to implement. Instead of
sending one GET_MBRS_REQ at a time we submit each in a separate thread to the thread pool.
public void sendGetMembersRequest(String cluster_name) {
for(Iterator<Address> it = initial_hosts.iterator();it.hasNext();){
final Address addr = it.next();
final Message msg = new Message(addr, null, null);
msg.setFlag(Message.OOB);
msg.putHeader(name, new PingHeader(PingHeader.GET_MBRS_REQ, cluster_name));
if(log.isTraceEnabled())
log.trace("[FIND_INITIAL_MBRS] sending PING request to " +
msg.getDest());
timer.submit(new Runnable() {
public void run() {
try{
down_prot.down(new Event(Event.MSG, msg));
}catch(Exception ex){
if(log.isErrorEnabled())
log.error("failed sending discovery request to " +
addr, ex);
}
}
});
}
}
Paralellize discovery phase
---------------------------
Key: JGRP-375
URL:
http://jira.jboss.com/jira/browse/JGRP-375
Project: JGroups
Issue Type: Feature Request
Affects Versions: 2.4
Reporter: Bela Ban
Assigned To: Bela Ban
Priority: Minor
Fix For: 2.7
With TCPPING, if we have 10 servers defined in the list, we sequentially send a
GET_MBRS_REQ to each. However, if that server is not reachable, we will timeout out on the
socket connect call. Also, DNS lookup might take some time, so we might time out if we
cannot contact all servers. Example: servers 1 - 10. 1-9 are down or not reachable, plus
we have a slow DNS, 10 is running. So before we get to 10, the discovery will timeout and
we will become a singleton node.
SOLUTION: use threads from the common (global) thread pool in JGroups to parallelize the
sending of requests to all 10 servers.
--
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