mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-05 20:48:22 +00:00
Discovery: UnicastZenPing don't rename configure host name
#7719 introduced temporary node ids for nodes that can't be resolved via their address. The change is overly aggressive and creates temporary nodes also for the configure target hosts. Closes #7747
This commit is contained in:
parent
e78737b19b
commit
2083ca0aa3
@ -305,12 +305,14 @@ public class UnicastZenPing extends AbstractLifecycleComponent<ZenPing> implemen
|
||||
// to make sure we don't disconnect a true node which was temporarily removed from the DiscoveryNodes
|
||||
// but will be added again during the pinging. We therefore create a new temporary node
|
||||
if (!nodeFoundByAddress) {
|
||||
DiscoveryNode tempNode = new DiscoveryNode("",
|
||||
UNICAST_NODE_PREFIX + unicastNodeIdGenerator.incrementAndGet() + "_" + nodeToSend.id(),
|
||||
nodeToSend.getHostName(), nodeToSend.getHostAddress(), nodeToSend.address(), nodeToSend.attributes(), nodeToSend.version()
|
||||
);
|
||||
logger.trace("replacing {} with temp node {}", nodeToSend, tempNode);
|
||||
nodeToSend = tempNode;
|
||||
if (!nodeToSend.id().startsWith(UNICAST_NODE_PREFIX)) {
|
||||
DiscoveryNode tempNode = new DiscoveryNode("",
|
||||
UNICAST_NODE_PREFIX + unicastNodeIdGenerator.incrementAndGet() + "_" + nodeToSend.id() + "#",
|
||||
nodeToSend.getHostName(), nodeToSend.getHostAddress(), nodeToSend.address(), nodeToSend.attributes(), nodeToSend.version()
|
||||
);
|
||||
logger.trace("replacing {} with temp node {}", nodeToSend, tempNode);
|
||||
nodeToSend = tempNode;
|
||||
}
|
||||
sendPingsHandler.nodeToDisconnect.add(nodeToSend);
|
||||
}
|
||||
// fork the connection to another thread
|
||||
|
Loading…
x
Reference in New Issue
Block a user