You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Luchnikov Alexander (Jira)" <ji...@apache.org> on 2022/05/13 10:27:00 UTC

[jira] [Updated] (IGNITE-14459) Affinity call may fail if called upon merged exchanges

     [ https://issues.apache.org/jira/browse/IGNITE-14459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luchnikov Alexander updated IGNITE-14459:
-----------------------------------------
    Labels: ise.lts  (was: )

> Affinity call may fail if called upon merged exchanges
> ------------------------------------------------------
>
>                 Key: IGNITE-14459
>                 URL: https://issues.apache.org/jira/browse/IGNITE-14459
>             Project: Ignite
>          Issue Type: Improvement
>          Components: compute
>            Reporter: Alexey Goncharuk
>            Assignee: Alexey Goncharuk
>            Priority: Major
>              Labels: ise.lts
>             Fix For: 2.13
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> When exchanges are merged, intermediate affinity assignments are not filled. At the same time, when a client chooses topology to run affinity call on, it may take a non-completed exchange version. As a result, when the affinity fetch task arrives on a node, it will look up a non-existing assignment, resulting in "Getting affinity for topology version earlier than affinity is calculated" exception.
> {{CacheAffinityCallSelfTest.testAffinityCallNoServerNode}} is flaky because of this bug.
> The following test case for {{CacheAffinityCallSelfTest}} demonstrates the issue:
> {code}
>     /**
>      * @throws Exception if failed.
>      */
>     @Test
>     public void testAffinityCallMergedExchanges() throws Exception {
>         startGrids(SRVS);
>         final Integer key = 1;
>         final IgniteEx client = startClientGrid(SRVS);
>         assertTrue(client.configuration().isClientMode());
>         assertNull(client.context().cache().cache(CACHE_NAME));
>         try {
>             grid(0).context().cache().context().exchange().mergeExchangesTestWaitVersion(
>                 new AffinityTopologyVersion(SRVS + 3, 0),
>                 null
>             );
>             IgniteInternalFuture<IgniteEx> fut1 = GridTestUtils.runAsync(() -> startGrid(SRVS + 1));
>             assertTrue(GridTestUtils.waitForCondition(() -> client.context().cache().context()
>                 .exchange().lastTopologyFuture()
>                 .initialVersion().equals(new AffinityTopologyVersion(SRVS + 2, 0)), 5_000));
>             assertFalse(fut1.isDone());
>             // The future should not complete until second node is started.
>             IgniteInternalFuture<Object> fut2 = GridTestUtils.runAsync(() ->
>                 client.compute().affinityCall(CACHE_NAME, key, new CheckCallable(key, null)));
>             startGrid(SRVS + 2);
>             fut1.get();
>             fut2.get();
>         }
>         finally {
>             stopAllGrids();
>         }
>     }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)