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/24 21:53:19 UTC

[ignite] branch ignite-627-tx created (now 26b8c55)

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

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


      at 26b8c55  ignite-627

This branch includes the following new commits:

     new 26b8c55  ignite-627

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-627

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

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

commit 26b8c55188ed399d235bd64e84f5b9896d0fda00
Author: sboikov <sb...@apache.org>
AuthorDate: Fri Jan 25 00:52:58 2019 +0300

    ignite-627
---
 .../internal/processors/cache/distributed/dht/GridDhtTxLocal.java  | 4 ++--
 .../processors/cache/distributed/dht/GridDhtTxLocalAdapter.java    | 7 ++-----
 .../processors/cache/distributed/dht/GridDhtTxPrepareFuture.java   | 2 ++
 .../internal/processors/cache/CacheNearReaderUpdateTest.java       | 2 --
 .../cache/GridCacheValueConsistencyAbstractSelfTest.java           | 6 ------
 5 files changed, 6 insertions(+), 15 deletions(-)

diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
index c83681c..7d7bbaf 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocal.java
@@ -392,12 +392,12 @@ public class GridDhtTxLocal extends GridDhtTxLocalAdapter implements GridCacheMa
         try {
             if (req.reads() != null) {
                 for (IgniteTxEntry e : req.reads())
-                    addEntry(req.messageId(), e);
+                    addEntry(e);
             }
 
             if (req.writes() != null) {
                 for (IgniteTxEntry e : req.writes())
-                    addEntry(req.messageId(), e);
+                    addEntry(e);
             }
 
             userPrepare(null);
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
index daaa5b4..a9ccd6f 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
@@ -466,16 +466,15 @@ public abstract class GridDhtTxLocalAdapter extends IgniteTxLocalAdapter {
     /**
      * @param msgId Message ID.
      * @param e Entry to add.
-     * @return Future for active transactions for the time when reader was added.
      * @throws IgniteCheckedException If failed.
      */
-    @Nullable public IgniteInternalFuture<Boolean> addEntry(long msgId, IgniteTxEntry e) throws IgniteCheckedException {
+    public void addEntry(IgniteTxEntry e) throws IgniteCheckedException {
         init();
 
         TransactionState state = state();
 
         assert state == PREPARING : "Invalid tx state for " +
-            "adding entry [msgId=" + msgId + ", e=" + e + ", tx=" + this + ']';
+            "adding entry [e=" + e + ", tx=" + this + ']';
 
         e.unmarshal(cctx, false, cctx.deploy().globalLoader());
 
@@ -525,8 +524,6 @@ public abstract class GridDhtTxLocalAdapter extends IgniteTxLocalAdapter {
                 if (log.isDebugEnabled())
                     log.debug("Added entry to transaction: " + existing);
             }
-
-            return addReader(msgId, dhtCache.entryExx(existing.key()), existing, topologyVersion());
         }
         catch (GridDhtInvalidPartitionException ex) {
             throw new IgniteCheckedException(ex);
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
index 3453380..6a98513 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
@@ -1573,6 +1573,8 @@ public final class GridDhtTxPrepareFuture extends GridCacheCompoundFuture<Ignite
 
         GridDhtCacheEntry cached = (GridDhtCacheEntry)entry.cached();
 
+        tx.addReader(req.messageId(), cached, entry, tx.topologyVersion());
+
         GridCacheContext cacheCtx = entry.context();
 
         GridDhtCacheAdapter<?, ?> dht = cacheCtx.isNear() ? cacheCtx.near().dht() : cacheCtx.dht();
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java
index 7788969..d18c8ef 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/CacheNearReaderUpdateTest.java
@@ -178,8 +178,6 @@ public class CacheNearReaderUpdateTest extends GridCommonAbstractTest {
         final List<Ignite> getNodes,
         final TransactionConcurrency concurrency,
         final TransactionIsolation isolation) throws Exception {
-        fail("https://issues.apache.org/jira/browse/IGNITE-627");
-
         log.info("Execute updates [concurrency=" + concurrency + ", isolation=" + isolation + ']');
 
         final Ignite ignite0 = ignite(0);
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java
index 6cb9d05..7c5c953 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheValueConsistencyAbstractSelfTest.java
@@ -237,9 +237,6 @@ public abstract class GridCacheValueConsistencyAbstractSelfTest extends GridCach
      */
     @Test
     public void testPutConsistencyMultithreaded() throws Exception {
-        if (nearEnabled())
-            fail("https://issues.apache.org/jira/browse/IGNITE-627");
-
         for (int i = 0; i < 20; i++) {
             log.info("Iteration: " + i);
 
@@ -291,9 +288,6 @@ public abstract class GridCacheValueConsistencyAbstractSelfTest extends GridCach
      */
     @Test
     public void testPutRemoveConsistencyMultithreaded() throws Exception {
-        if (nearEnabled())
-            fail("https://issues.apache.org/jira/browse/IGNITE-627");
-
        for (int i = 0; i < SF.applyLB(10, 2); i++) {
            log.info("Iteration: " + i);