[
https://issues.apache.org/jira/browse/IGNITE-4380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16744819#comment-16744819
]
Amelchev Nikita commented on IGNITE-4380:
-----------------------------------------
[~agoncharuk], I still don't see the point of not using the {{KeyLockFuture}}
for the local cache issue.
Local entries are skipping in the {{readyLocks}} method because their local
candidate added earlier (in {{entry.tmLock}} on {{userPrepare}} step). Also,
their keys are not added to the {{lockKeys}} map because they are already
stored in {{KeyLockFuture}}. Why keep them twice?
Correct me if I misunderstood your resolution:
The {{onEntriesLocked()}} method should be called after all locks acquired. For
this purpose, the {{onOwnerChanged}} method should checks entries locks
(through the {{mapIfLocked()}} and the {{checkLocks()}} methods).
Local keys should be stored in the {{lockKeys}} map in the {{readyLocks}}
method.
Local keys shouldn't be stored in the {{KeyLockFuture}}.
In addition need to add a local candidate {{readyLocal(cand)}} after
{{GridDhtTxPrepareFuture}} added through {{cctx.mvcc ().addFuture(fut);}} This
is to ensure that we could monitor the state of the owner in the
{{onOwnerChanged}} method.
Should I investigate this way more deeply or resolution with {{KeyLockFuture}}
more applicable?
> Cache invoke calls can be lost
> ------------------------------
>
> Key: IGNITE-4380
> URL: https://issues.apache.org/jira/browse/IGNITE-4380
> Project: Ignite
> Issue Type: Bug
> Components: cache
> Affects Versions: 2.0
> Reporter: Semen Boikov
> Assignee: Amelchev Nikita
> Priority: Critical
> Labels: MakeTeamcityGreenAgain
> Fix For: 2.8
>
>
> * Recently added test
> GridCacheAbstractFullApiSelfTest.testInvokeAllMultithreaded fails on TC in
> various configurations with transactional cache.
> Example of failure
> GridCacheReplicatedOffHeapTieredMultiNodeFullApiSelfTest.testInvokeAllMultithreaded:
> {noformat}
> junit.framework.AssertionFailedError: expected:<20000> but was:<10868>
> 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.GridCacheAbstractFullApiSelfTest.testInvokeAllMultithreaded(GridCacheAbstractFullApiSelfTest.java:342)
> at sun.reflect.GeneratedMethodAccessor96.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at junit.framework.TestCase.runTest(TestCase.java:176)
> at
> org.apache.ignite.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:1803)
> at
> org.apache.ignite.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:118)
> at
> org.apache.ignite.testframework.junits.GridAbstractTest$4.run(GridAbstractTest.java:1718)
> at java.lang.Thread.run(Thread.java:745)
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)