ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [01/16] incubator-ignite git commit: IGNITE-285 - Fixing read committed mode for transaction.
Date Wed, 25 Feb 2015 10:53:04 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-326 be4881b58 -> 00e119215


IGNITE-285 - Fixing read committed mode for transaction.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/3cbc0ca3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/3cbc0ca3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/3cbc0ca3

Branch: refs/heads/ignite-326
Commit: 3cbc0ca392a4622c81028f5815b1319db9097f41
Parents: 3021ef8
Author: Alexey Goncharuk <agoncharuk@gridgain.com>
Authored: Tue Feb 17 19:29:04 2015 -0800
Committer: Alexey Goncharuk <agoncharuk@gridgain.com>
Committed: Tue Feb 17 19:29:04 2015 -0800

----------------------------------------------------------------------
 .../processors/cache/transactions/IgniteTxLocalAdapter.java  | 8 ++++++++
 .../distributed/near/IgniteCacheNearReadCommittedTest.java   | 3 +++
 2 files changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3cbc0ca3/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
index 8ffe224..f1efff6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxLocalAdapter.java
@@ -1346,6 +1346,14 @@ public abstract class IgniteTxLocalAdapter<K, V> extends IgniteTxAdapter<K,
V>
 
                         break; // While loop.
                     }
+                    finally {
+                        if (cacheCtx.isNear() && entry != null && readCommitted())
{
+                            if (cacheCtx.affinity().belongs(cacheCtx.localNode(), entry.key(),
topVer)) {
+                                if (entry.markObsolete(xidVer))
+                                    cacheCtx.cache().removeEntry(entry);
+                            }
+                        }
+                    }
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/3cbc0ca3/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java
index 8de0509..d5aec53 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/near/IgniteCacheNearReadCommittedTest.java
@@ -29,6 +29,7 @@ import static org.apache.ignite.transactions.TransactionIsolation.*;
 /**
  *
  */
+@SuppressWarnings("RedundantMethodOverride")
 public class IgniteCacheNearReadCommittedTest extends GridCacheAbstractSelfTest {
     /** {@inheritDoc} */
     @Override protected int gridCount() {
@@ -55,6 +56,8 @@ public class IgniteCacheNearReadCommittedTest extends GridCacheAbstractSelfTest
 
         cache.put(key, key);
 
+        assertEquals(1, cache.localSize());
+
         try (Transaction tx = ignite(0).transactions().txStart(PESSIMISTIC, READ_COMMITTED))
{
             assertEquals(key, cache.get(key));
 


Mime
View raw message