[ 
https://issues.apache.org/jira/browse/IGNITE-5960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16189559#comment-16189559
 ] 

Sergey Chugunov commented on IGNITE-5960:
-----------------------------------------

[~Alexey Kuznetsov] I reviewed your fix, it seems that the initial problem is 
still here, your change just reduces probability to spot it.

As you correctly identified, bug is caused by the fact that entities of some 
updates (and corresponding update counters) may be skipped.

Even with your fix lets consider the following sequence of events:
1) T1 updates E1 (updateCounter gets incremented to 1);
2) T2 updates E2 (updateCounter gets incremented to 2);
3) T2 finishes update and exits GridCacheMapEntry::innerUpdate method;
4) user adds continuous query listener;
5) T1 proceeds, picks up listener (not null thanks to the fix) and notifies 
listener;
6) T3 updates E3 (updateCounter gets incremented to 3) and notifies listener;

After steps 5 and 6 we'll face the same issue as without fix (although its 
probability is much less).

Proposed fix masks the problem not fixes it, so we need to come up with another 
approach.

> Ignite Continuous Query (Queries 3): 
> CacheContinuousQueryConcurrentPartitionUpdateTest::testConcurrentUpdatesAndQueryStartAtomic
>  is flaky
> -----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-5960
>                 URL: https://issues.apache.org/jira/browse/IGNITE-5960
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Sergey Chugunov
>            Assignee: Alexey Kuznetsov
>              Labels: MakeTeamcityGreenAgain, test-failure
>             Fix For: 2.3
>
>
> According to [TC 
> history|http://ci.ignite.apache.org/project.html?projectId=Ignite20Tests&testNameId=6546112007182082024&tab=testDetails&branch_Ignite20Tests=%3Cdefault%3E]
>  test is flaky.
> It is possible to reproduce it locally, sample run shows 9 failed tests out 
> of 30 overall executed.
> Test fails with jUnit assertion check: 
> {noformat}
> junit.framework.AssertionFailedError: 
> Expected :10000
> Actual   :0
>  <Click to see difference>
>       at junit.framework.Assert.fail(Assert.java:57)
>       at junit.framework.Assert.failNotEquals(Assert.java:329)
>       at junit.framework.Assert.assertEquals(Assert.java:78)
>       at junit.framework.Assert.assertEquals(Assert.java:234)
>       at junit.framework.Assert.assertEquals(Assert.java:241)
>       at junit.framework.TestCase.assertEquals(TestCase.java:409)
>       at 
> org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryConcurrentPartitionUpdateTest.concurrentUpdatesAndQueryStart(CacheContinuousQueryConcurrentPartitionUpdateTest.java:385)
>       at 
> org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryConcurrentPartitionUpdateTest.testConcurrentUpdatesAndQueryStartTx(CacheContinuousQueryConcurrentPartitionUpdateTest.java:245)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:498)
>       at junit.framework.TestCase.runTest(TestCase.java:176)
>       at 
> org.apache.ignite.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:2000)
>       at 
> org.apache.ignite.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:132)
>       at 
> org.apache.ignite.testframework.junits.GridAbstractTest$5.run(GridAbstractTest.java:1915)
>       at java.lang.Thread.run(Thread.java:745)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to