[jira] [Commented] (IGNITE-7389) DataStreamer hangs if exception was thrown during addData which isn't IgniteException
[ https://issues.apache.org/jira/browse/IGNITE-7389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16326248#comment-16326248 ] Ilya Lantukh commented on IGNITE-7389: -- 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)
[jira] [Commented] (IGNITE-7389) DataStreamer hangs if exception was thrown during addData which isn't IgniteException
[ https://issues.apache.org/jira/browse/IGNITE-7389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16330302#comment-16330302 ] Anton Vinogradov commented on IGNITE-7389: -- [~ilantukh] I see no reason to check cache each addData. Let's check it once on DataStreamer creation. > 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)
[jira] [Commented] (IGNITE-7389) DataStreamer hangs if exception was thrown during addData which isn't IgniteException
[ https://issues.apache.org/jira/browse/IGNITE-7389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16337675#comment-16337675 ] Ilya Lantukh commented on IGNITE-7389: -- [~avinogradov], I've changed my patch as you suggested. Please review again. > 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)