Skip to content

Commit b718e44

Browse files
ivandaschdspavlov
authored andcommitted
IGNITE-8869 PartitionsExchangeOnDiscoveryHistoryOverflowTest hangs on TeamCity. - Fixes apache#4277.
Signed-off-by: Dmitriy Pavlov <[email protected]>
1 parent 24bd54a commit b718e44

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/latch/ExchangeLatchManager.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@
3838
import org.apache.ignite.internal.GridTopic;
3939
import org.apache.ignite.internal.managers.communication.GridIoManager;
4040
import org.apache.ignite.internal.managers.communication.GridIoPolicy;
41-
import org.apache.ignite.internal.managers.discovery.DiscoCache;
4241
import org.apache.ignite.internal.managers.discovery.GridDiscoveryManager;
4342
import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
4443
import org.apache.ignite.internal.util.GridConcurrentHashSet;
4544
import org.apache.ignite.internal.util.future.GridFutureAdapter;
4645
import org.apache.ignite.internal.util.tostring.GridToStringExclude;
4746
import org.apache.ignite.internal.util.tostring.GridToStringInclude;
47+
import org.apache.ignite.internal.util.typedef.internal.CU;
4848
import org.apache.ignite.internal.util.typedef.internal.S;
4949
import org.apache.ignite.lang.IgniteProductVersion;
5050
import org.jetbrains.annotations.Nullable;
@@ -228,13 +228,13 @@ private Collection<ClusterNode> aliveNodesForTopologyVer(AffinityTopologyVersion
228228
if (topVer == AffinityTopologyVersion.NONE)
229229
return discovery.aliveServerNodes();
230230
else {
231-
DiscoCache discoCache = discovery.discoCache(topVer);
231+
Collection<ClusterNode> histNodes = discovery.topology(topVer.topologyVersion());
232232

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());
235236
else
236-
throw new IgniteException("DiscoCache not found for topology "
237-
+ topVer
237+
throw new IgniteException("Topology " + topVer + " not found in discovery history "
238238
+ "; consider increasing IGNITE_DISCOVERY_HISTORY_SIZE property. Current value is "
239239
+ IgniteSystemProperties.getInteger(IgniteSystemProperties.IGNITE_DISCOVERY_HISTORY_SIZE, -1));
240240
}

modules/core/src/test/java/org/apache/ignite/internal/processors/cache/PartitionsExchangeOnDiscoveryHistoryOverflowTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@ public class PartitionsExchangeOnDiscoveryHistoryOverflowTest extends IgniteCach
122122
* @throws Exception In case of error.
123123
*/
124124
public void testDynamicCacheCreation() throws Exception {
125-
fail("https://issues.apache.org/jira/browse/IGNITE-8869 should fail if ignite-8869 reverts");
126-
127125
for (int iter = 0; iter < 5; iter++) {
128126
log.info("Iteration: " + iter);
129127

0 commit comments

Comments
 (0)