[
https://issues.apache.org/jira/browse/IGNITE-7389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16326248#comment-16326248
]
Ilya Lantukh edited comment on IGNITE-7389 at 1/15/18 1:45 PM:
---
Reproducer:
{noformat}
public void testCacheStartAndStreamOpenFromDifferentNodes() throws Exception {
final Ignite ignite0 = startGrids(2);
final Ignite ignite1 = grid(1);
final String cacheName = "testCache";
IgniteCache cache = ignite0.getOrCreateCache(
new CacheConfiguration().setName(cacheName));
try (IgniteDataStreamer ldr =
ignite1.dataStreamer(cacheName)) {
ldr.addData(0, 0);
}
assertEquals(Integer.valueOf(0), cache.get(0));
}
{noformat}
No exception will be thrown from IgniteDataStreamer methods, the problem will
be indicated only by missing value in cache.
was (Author: ilantukh):
Reproducer:
{noformat}
public void testCacheStartAndStreamOpenFromDifferentNodes() throws Exception {
final Ignite ignite0 = startGrids(2);
final Ignite ignite1 = grid(1);
final String cacheName = "testCache";
IgniteCache cache = ignite0.getOrCreateCache(
new CacheConfiguration().setName(cacheName));
U.sleep(1000);
try (IgniteDataStreamer ldr =
ignite1.dataStreamer(cacheName)) {
ldr.addData(0, 0);
}
assertEquals(Integer.valueOf(0), cache.get(0));
}
{noformat}
No exception will be thrown from IgniteDataStreamer methods, the problem will
be indicated only by missing value in cache.
> DataStreamer hangs if exception was thrown during addData which isn't
> IgniteException
> -
>
> Key: IGNITE-7389
> URL: https://issues.apache.org/jira/browse/IGNITE-7389
> Project: Ignite
> Issue Type: Bug
>Reporter: Eduard Shangareev
>Assignee: Ilya Lantukh
>Priority: Major
>
> I have written test which starts cache on one node and right after that
> starts dataStreamer on another node. Which hangs on close method because
> {{resFut}} will never be done.
> {code}
> java.lang.IllegalStateException: Getting affinity for topology version
> earlier than affinity is calculated [locNode=TcpDiscoveryNode
> [id=ad14d7f6-5895-4038-ba5e-cc487ab0, addrs=[127.0.0.1],
> sockAddrs=[/127.0.0.1:47501], discPort=47501, order=2, intOrder=2,
> lastExchangeTime=1515672065430, loc=true, ver=2.4.0#19700101-sha1:,
> isClient=false], grp=PART-G2, topVer=AffinityTopologyVersion [topVer=4,
> minorTopVer=3], head=AffinityTopologyVersion [topVer=4, minorTopVer=4],
> history=[AffinityTopologyVersion [topVer=4, minorTopVer=4]]]
> at
> org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.cachedAffinity(GridAffinityAssignmentCache.java:603)
> at
> org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.assignment(GridCacheAffinityManager.java:243)
> at
> org.apache.ignite.internal.processors.affinity.GridAffinityProcessor.affinityCache(GridAffinityProcessor.java:375)
> at
> org.apache.ignite.internal.processors.affinity.GridAffinityProcessor.partition0(GridAffinityProcessor.java:187)
> at
> org.apache.ignite.internal.processors.cacheobject.IgniteCacheObjectProcessorImpl.partition(IgniteCacheObjectProcessorImpl.java:267)
> at
> org.apache.ignite.internal.processors.cacheobject.IgniteCacheObjectProcessorImpl.toCacheKeyObject0(IgniteCacheObjectProcessorImpl.java:135)
> at
> org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl.toCacheKeyObject(CacheObjectBinaryProcessorImpl.java:805)
> at
> org.apache.ignite.internal.processors.datastreamer.DataStreamerImpl.addData(DataStreamerImpl.java:581)
> at
> org.apache.ignite.internal.processors.datastreamer.DataStreamerImpl.addData(DataStreamerImpl.java:555)
> at
> org.gridgain.grid.internal.processors.cache.database.AbstractSnapshotTest$2.run(AbstractSnapshotTest.java:404)
> at
> org.apache.ignite.testframework.GridTestUtils$6.run(GridTestUtils.java:933)
> at
> org.apache.ignite.testframework.GridTestUtils$9.call(GridTestUtils.java:1278)
> at
> org.apache.ignite.testframework.GridTestThread.run(GridTestThread.java:86)
> {code}
> The best solution is waiting for topology on which cache should be started.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)