You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2019/01/23 11:56:24 UTC

[ignite] branch ignite-835 created (now 5d6baf3)

This is an automated email from the ASF dual-hosted git repository.

sboikov pushed a change to branch ignite-835
in repository https://gitbox.apache.org/repos/asf/ignite.git.


      at 5d6baf3  ignite-835

This branch includes the following new commits:

     new 5d6baf3  ignite-835

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[ignite] 01/01: ignite-835

Posted by sb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sboikov pushed a commit to branch ignite-835
in repository https://gitbox.apache.org/repos/asf/ignite.git

commit 5d6baf39724c0b420a32a7b3255e6c795bf0ec7a
Author: sboikov <sb...@apache.org>
AuthorDate: Wed Jan 23 14:55:33 2019 +0300

    ignite-835
---
 .../processors/cache/GridCacheExplicitLockSpan.java     | 17 +++++++++++++++--
 .../GridCachePartitionedNearDisabledLockSelfTest.java   |  7 -------
 .../replicated/GridCacheReplicatedLockSelfTest.java     |  7 -------
 .../Cache/CacheAbstractTransactionalTest.cs             |  1 -
 4 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheExplicitLockSpan.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheExplicitLockSpan.java
index b0cb302..dfc12d7 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheExplicitLockSpan.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheExplicitLockSpan.java
@@ -155,8 +155,21 @@ public class GridCacheExplicitLockSpan extends ReentrantLock {
             if (deque != null) {
                 assert !deque.isEmpty();
 
-                if (ver == null || deque.peekFirst().version().equals(ver)) {
-                    cand = deque.removeFirst();
+                GridCacheMvccCandidate first = deque.peekFirst();
+
+                if (ver == null || first.version().equals(ver)) {
+                    GridCacheMvccCandidate reentry  = first.unenter();
+
+                    if (reentry != null) {
+                        assert reentry.reentry() : reentry;
+
+                        boolean rmvd = deque.remove(reentry);
+
+                        assert rmvd : reentry;
+
+                        cand = reentry;
+                    } else
+                        cand = deque.removeFirst();
 
                     if (deque.isEmpty())
                         cands.remove(cand.key());
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledLockSelfTest.java
index ff738c6..5ae5959 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledLockSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridCachePartitionedNearDisabledLockSelfTest.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache.distributed.dht;
 
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridCachePartitionedLockSelfTest;
-import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.JUnit4;
 
@@ -43,10 +42,4 @@ public class GridCachePartitionedNearDisabledLockSelfTest extends GridCacheParti
     @Override protected boolean isPartitioned() {
         return false;
     }
-
-    /** {@inheritDoc} */
-    @Test
-    @Override public void testLockReentrancy() throws Throwable {
-        fail("https://issues.apache.org/jira/browse/IGNITE-835");
-    }
 }
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedLockSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedLockSelfTest.java
index c37e814..81b1edf 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedLockSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/replicated/GridCacheReplicatedLockSelfTest.java
@@ -19,7 +19,6 @@ package org.apache.ignite.internal.processors.cache.distributed.replicated;
 
 import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.internal.processors.cache.distributed.GridCacheLockAbstractTest;
-import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.JUnit4;
 
@@ -34,10 +33,4 @@ public class GridCacheReplicatedLockSelfTest extends GridCacheLockAbstractTest {
     @Override protected CacheMode cacheMode() {
         return REPLICATED;
     }
-
-    /** {@inheritDoc} */
-    @Test
-    @Override public void testLockReentrancy() throws Throwable {
-        fail("https://issues.apache.org/jira/browse/IGNITE-835");
-    }
 }
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
index a70d9b7..d74a55f 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/CacheAbstractTransactionalTest.cs
@@ -79,7 +79,6 @@ namespace Apache.Ignite.Core.Tests.Cache
         /// Tests cache locks.
         /// </summary>
         [Test]
-        [Ignore("IGNITE-835")]
         public void TestLock()
         {
             var cache = Cache();