|
38 | 38 | import org.apache.ignite.internal.GridTopic; |
39 | 39 | import org.apache.ignite.internal.managers.communication.GridIoManager; |
40 | 40 | import org.apache.ignite.internal.managers.communication.GridIoPolicy; |
41 | | -import org.apache.ignite.internal.managers.discovery.DiscoCache; |
42 | 41 | import org.apache.ignite.internal.managers.discovery.GridDiscoveryManager; |
43 | 42 | import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion; |
44 | 43 | import org.apache.ignite.internal.util.GridConcurrentHashSet; |
45 | 44 | import org.apache.ignite.internal.util.future.GridFutureAdapter; |
46 | 45 | import org.apache.ignite.internal.util.tostring.GridToStringExclude; |
47 | 46 | import org.apache.ignite.internal.util.tostring.GridToStringInclude; |
| 47 | +import org.apache.ignite.internal.util.typedef.internal.CU; |
48 | 48 | import org.apache.ignite.internal.util.typedef.internal.S; |
49 | 49 | import org.apache.ignite.lang.IgniteProductVersion; |
50 | 50 | import org.jetbrains.annotations.Nullable; |
@@ -228,13 +228,13 @@ private Collection<ClusterNode> aliveNodesForTopologyVer(AffinityTopologyVersion |
228 | 228 | if (topVer == AffinityTopologyVersion.NONE) |
229 | 229 | return discovery.aliveServerNodes(); |
230 | 230 | else { |
231 | | - DiscoCache discoCache = discovery.discoCache(topVer); |
| 231 | + Collection<ClusterNode> histNodes = discovery.topology(topVer.topologyVersion()); |
232 | 232 |
|
233 | | - if (discoCache != null) |
234 | | - return discoCache.aliveServerNodes(); |
| 233 | + if (histNodes != null) |
| 234 | + return histNodes.stream().filter(n -> !CU.clientNode(n) && !n.isDaemon() && discovery.alive(n)) |
| 235 | + .collect(Collectors.toList()); |
235 | 236 | else |
236 | | - throw new IgniteException("DiscoCache not found for topology " |
237 | | - + topVer |
| 237 | + throw new IgniteException("Topology " + topVer + " not found in discovery history " |
238 | 238 | + "; consider increasing IGNITE_DISCOVERY_HISTORY_SIZE property. Current value is " |
239 | 239 | + IgniteSystemProperties.getInteger(IgniteSystemProperties.IGNITE_DISCOVERY_HISTORY_SIZE, -1)); |
240 | 240 | } |
|
0 commit comments