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

Mirza Aliev updated IGNITE-20412:
---------------------------------
    Description: 
h3. Motivation

org.apache.ignite.internal.distribution.zones.ItIgniteDistributionZoneManagerNodeRestartTest#testScaleUpsTriggeredByFilterUpdateAndNodeJoinAreRestoredAfterRestart
 started to fall in the catalog-feature branch and fails in the main branch 
after catalog-feature is merged

[https://ci.ignite.apache.org/viewLog.html?buildId=7501721&tab=buildResultsDiv&buildTypeId=ApacheIgnite3xGradle_Test_RunAllTests&logTab=]
{code:java}
java.lang.AssertionError:
Expected: is <[]>
     but: was <[A]>
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
at 
org.apache.ignite.internal.distributionzones.DistributionZonesTestUtil.assertValueInStorage(DistributionZonesTestUtil.java:459)
at 
org.apache.ignite.internal.distribution.zones.ItIgniteDistributionZoneManagerNodeRestartTest.testScaleUpsTriggeredByFilterUpdateAndNodeJoinAreRestoredAfterRestart(ItIgniteDistributionZoneManagerNodeRestartTest.java:539)
{code}
h3. Implementation notes

The root cause:
 # This test changes metaStorageManager behavior and it throws expected 
exception on ms.invoke.
 # The test alters zone with new filter.
 # DistributionZoneManager#onUpdateFilter return a future from 
saveDataNodesToMetaStorageOnScaleUp(zoneId, causalityToken)
 # The future is completed exceptionally and WatchProcessor#notificationFuture 
will be completed exceptionally.
 # Next updates will not be handled properly because notificationFuture is 
completed exceptionally.

We have already created tickets obout exception handling:
 * https://issues.apache.org/jira/browse/IGNITE-14693
 * https://issues.apache.org/jira/browse/IGNITE-14611

 

The test scenario is incorrect because the node should be stopped (by failure 
handler) if the ms.invoke failed. We need to rewrite it when the DZM restart 
will be updated.


UPD1:

I've tried to rewrite test, so we could not throw exception in metastorage 
handler, but just force thread to wait in this invoke, but this lead the to the 
problem that because we use spy on Standalone Metastorage, and mockito use 
synchronised block when we call ms.invoke, so that leads to the problem that 
blocking of one invoke leads to blocking all other communication with ms.

Need further investigation how to rewrite this test 

  was:
h3. Motivation

org.apache.ignite.internal.distribution.zones.ItIgniteDistributionZoneManagerNodeRestartTest#testScaleUpsTriggeredByFilterUpdateAndNodeJoinAreRestoredAfterRestart
 started to fall in the catalog-feature branch and fails in the main branch 
after catalog-feature is merged

[https://ci.ignite.apache.org/viewLog.html?buildId=7501721&tab=buildResultsDiv&buildTypeId=ApacheIgnite3xGradle_Test_RunAllTests&logTab=]
{code:java}
java.lang.AssertionError:
Expected: is <[]>
     but: was <[A]>
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
at 
org.apache.ignite.internal.distributionzones.DistributionZonesTestUtil.assertValueInStorage(DistributionZonesTestUtil.java:459)
at 
org.apache.ignite.internal.distribution.zones.ItIgniteDistributionZoneManagerNodeRestartTest.testScaleUpsTriggeredByFilterUpdateAndNodeJoinAreRestoredAfterRestart(ItIgniteDistributionZoneManagerNodeRestartTest.java:539)
{code}
h3. Implementation notes

The root cause:
 # This test changes metaStorageManager behavior and it throws expected 
exception on ms.invoke.
 # The test alters zone with new filter.
 # DistributionZoneManager#onUpdateFilter return a future from 
saveDataNodesToMetaStorageOnScaleUp(zoneId, causalityToken)
 # The future is completed exceptionally and WatchProcessor#notificationFuture 
will be completed exceptionally.
 # Next updates will not be handled properly because notificationFuture is 
completed exceptionally.

We have already created tickets obout exception handling:
 * https://issues.apache.org/jira/browse/IGNITE-14693
 * https://issues.apache.org/jira/browse/IGNITE-14611

 

The test scenario is incorrect because the node should be stopped (by failure 
handler) if the ms.invoke failed. We need to rewrite it when the DZM restart 
will be updated.


> Fix 
> ItIgniteDistributionZoneManagerNodeRestartTest#testScaleUpsTriggeredByFilterUpdateAndNodeJoinAreRestoredAfterRestart
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-20412
>                 URL: https://issues.apache.org/jira/browse/IGNITE-20412
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Kirill Tkalenko
>            Assignee: Sergey Uttsel
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.0.0-beta2
>
>
> h3. Motivation
> org.apache.ignite.internal.distribution.zones.ItIgniteDistributionZoneManagerNodeRestartTest#testScaleUpsTriggeredByFilterUpdateAndNodeJoinAreRestoredAfterRestart
>  started to fall in the catalog-feature branch and fails in the main branch 
> after catalog-feature is merged
> [https://ci.ignite.apache.org/viewLog.html?buildId=7501721&tab=buildResultsDiv&buildTypeId=ApacheIgnite3xGradle_Test_RunAllTests&logTab=]
> {code:java}
> java.lang.AssertionError:
> Expected: is <[]>
>      but: was <[A]>
> at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
> at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
> at 
> org.apache.ignite.internal.distributionzones.DistributionZonesTestUtil.assertValueInStorage(DistributionZonesTestUtil.java:459)
> at 
> org.apache.ignite.internal.distribution.zones.ItIgniteDistributionZoneManagerNodeRestartTest.testScaleUpsTriggeredByFilterUpdateAndNodeJoinAreRestoredAfterRestart(ItIgniteDistributionZoneManagerNodeRestartTest.java:539)
> {code}
> h3. Implementation notes
> The root cause:
>  # This test changes metaStorageManager behavior and it throws expected 
> exception on ms.invoke.
>  # The test alters zone with new filter.
>  # DistributionZoneManager#onUpdateFilter return a future from 
> saveDataNodesToMetaStorageOnScaleUp(zoneId, causalityToken)
>  # The future is completed exceptionally and 
> WatchProcessor#notificationFuture will be completed exceptionally.
>  # Next updates will not be handled properly because notificationFuture is 
> completed exceptionally.
> We have already created tickets obout exception handling:
>  * https://issues.apache.org/jira/browse/IGNITE-14693
>  * https://issues.apache.org/jira/browse/IGNITE-14611
>  
> The test scenario is incorrect because the node should be stopped (by failure 
> handler) if the ms.invoke failed. We need to rewrite it when the DZM restart 
> will be updated.
> UPD1:
> I've tried to rewrite test, so we could not throw exception in metastorage 
> handler, but just force thread to wait in this invoke, but this lead the to 
> the problem that because we use spy on Standalone Metastorage, and mockito 
> use synchronised block when we call ms.invoke, so that leads to the problem 
> that blocking of one invoke leads to blocking all other communication with ms.
> Need further investigation how to rewrite this test 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to