24 lines
1.1 KiB
Diff
24 lines
1.1 KiB
Diff
# UNDF: UNDF-2026-000000570
|
|
--- a/vertx-core/src/main/java/io/vertx/core/impl/HAManager.java
|
|
+++ b/vertx-core/src/main/java/io/vertx/core/impl/HAManager.java
|
|
@@ -304,15 +304,15 @@ public class HAManager {
|
|
// We also check for and potentially resume any previous failovers that might have failed
|
|
// We can determine this if there any ids in the cluster map which aren't in the node list
|
|
- List<String> nodes = clusterManager.getNodes();
|
|
+ Set<String> nodes = new HashSet<>(clusterManager.getNodes());
|
|
|
|
for (Map.Entry<String, String> entry: clusterMap.entrySet()) {
|
|
if (!leftNodeID.equals(entry.getKey()) && !nodes.contains(entry.getKey())) {
|
|
JsonObject haInfo = new JsonObject(entry.getValue());
|
|
checkFailover(entry.getKey(), haInfo);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
private void addHaInfoIfLost() {
|
|
- if (clusterManager.getNodes().contains(nodeID) && !clusterMap.containsKey(nodeID)) {
|
|
+ if (new HashSet<>(clusterManager.getNodes()).contains(nodeID) && !clusterMap.containsKey(nodeID)) {
|
|
synchronized (haInfo) {
|
|
clusterMap.put(nodeID, haInfo.encode());
|
|
}
|