ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject ignite git commit: ignite-3478
Date Tue, 05 Sep 2017 13:13:07 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-3478 5a82c68dc -> 43834aaab


ignite-3478


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

Branch: refs/heads/ignite-3478
Commit: 43834aaab9e2c3cd5fdd55289fdc4a9ff8ab6599
Parents: 5a82c68
Author: sboikov <sboikov@gridgain.com>
Authored: Tue Sep 5 16:13:00 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Tue Sep 5 16:13:00 2017 +0300

----------------------------------------------------------------------
 .../internal/processors/cache/GridCacheEntryEx.java       |  4 ++--
 .../internal/processors/cache/GridCacheMapEntry.java      |  4 ++--
 .../cache/distributed/GridDistributedTxRemoteAdapter.java |  8 ++++----
 .../processors/cache/transactions/IgniteTxAdapter.java    | 10 ++--------
 .../cache/transactions/IgniteTxLocalAdapter.java          | 10 +++++-----
 .../internal/processors/cache/GridCacheTestEntryEx.java   |  5 ++---
 6 files changed, 17 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/43834aaa/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
index 7ce36df..8c17d4e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryEx.java
@@ -386,7 +386,7 @@ public interface GridCacheEntryEx {
         String taskName,
         @Nullable GridCacheVersion dhtVer,
         @Nullable Long updateCntr,
-        @Nullable TxMvccVersion mvccVer
+        long mvccCntr
     ) throws IgniteCheckedException, GridCacheEntryRemovedException;
 
     /**
@@ -429,7 +429,7 @@ public interface GridCacheEntryEx {
         String taskName,
         @Nullable GridCacheVersion dhtVer,
         @Nullable Long updateCntr,
-        @Nullable TxMvccVersion mvccVer
+        long mvccCntr
     ) throws IgniteCheckedException, GridCacheEntryRemovedException;
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/43834aaa/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
index 549b14b..dae874c 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
@@ -909,7 +909,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
         String taskName,
         @Nullable GridCacheVersion dhtVer,
         @Nullable Long updateCntr,
-        @Nullable TxMvccVersion mvccVer
+        long mvccCntr
     ) throws IgniteCheckedException, GridCacheEntryRemovedException {
         CacheObject old;
 
@@ -1104,7 +1104,7 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
         String taskName,
         @Nullable GridCacheVersion dhtVer,
         @Nullable Long updateCntr,
-        @Nullable TxMvccVersion mvccVer
+        long mvccCntr
     ) throws IgniteCheckedException, GridCacheEntryRemovedException {
         assert cctx.transactional();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/43834aaa/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
index db1e2dc..fef3e7e 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/GridDistributedTxRemoteAdapter.java
@@ -475,7 +475,7 @@ public abstract class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
                     cctx.database().checkpointReadLock();
 
                     try {
-                        TxMvccVersion mvccVer = createMvccVersion();
+                        long mvccCntr = mvccCounterForCommit();
 
                         Collection<IgniteTxEntry> entries = near() ? allEntries() :
writeEntries();
 
@@ -598,7 +598,7 @@ public abstract class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
                                                         resolveTaskName(),
                                                         dhtVer,
                                                         txEntry.updateCounter(),
-                                                        mvccVer);
+                                                        mvccCntr);
                                                 else {
                                                     assert val != null : txEntry;
 
@@ -623,7 +623,7 @@ public abstract class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
                                                         resolveTaskName(),
                                                         dhtVer,
                                                         txEntry.updateCounter(),
-                                                        mvccVer);
+                                                        mvccCntr);
 
                                                     // Keep near entry up to date.
                                                     if (nearCached != null) {
@@ -656,7 +656,7 @@ public abstract class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
                                                     resolveTaskName(),
                                                     dhtVer,
                                                     txEntry.updateCounter(),
-                                                    mvccVer);
+                                                    mvccCntr);
 
                                                 // Keep near entry up to date.
                                                 if (nearCached != null)

http://git-wip-us.apache.org/repos/asf/ignite/blob/43834aaa/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
index 264e2a0..2d96f72 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
@@ -1545,16 +1545,10 @@ public abstract class IgniteTxAdapter extends GridMetadataAwareAdapter
implement
     /**
      * @return Mvcc version.
      */
-    protected final TxMvccVersion createMvccVersion() {
+    protected final long mvccCounterForCommit() {
         assert !txState().mvccEnabled(cctx) || mvccCrdCntr != TxMvccVersion.COUNTER_NA :
mvccCrdCntr;
 
-        if (mvccCrdCntr != TxMvccVersion.COUNTER_NA) {
-            return new TxMvccVersion(topologyVersion().topologyVersion(),
-                mvccCrdCntr,
-                nearXidVersion());
-        }
-
-        return null;
+        return mvccCrdCntr;
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/43834aaa/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 32ab96e..82be466 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
@@ -508,7 +508,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements
Ig
             try {
                 cctx.tm().txContext(this);
 
-                TxMvccVersion mvccVer = createMvccVersion();
+                long mvccCntr = mvccCounterForCommit();
 
                 AffinityTopologyVersion topVer = topologyVersion();
 
@@ -688,7 +688,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements
Ig
                                             resolveTaskName(),
                                             dhtVer,
                                             null,
-                                            mvccVer);
+                                            mvccCntr);
 
                                         if (updRes.success())
                                             txEntry.updateCounter(updRes.updatePartitionCounter());
@@ -716,7 +716,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements
Ig
                                                 resolveTaskName(),
                                                 dhtVer,
                                                 null,
-                                                mvccVer);
+                                                mvccCntr);
                                         }
                                     }
                                     else if (op == DELETE) {
@@ -738,7 +738,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements
Ig
                                             resolveTaskName(),
                                             dhtVer,
                                             null,
-                                            mvccVer);
+                                            mvccCntr);
 
                                         if (updRes.success())
                                             txEntry.updateCounter(updRes.updatePartitionCounter());
@@ -762,7 +762,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter implements
Ig
                                                 resolveTaskName(),
                                                 dhtVer,
                                                 null,
-                                                mvccVer);
+                                                mvccCntr);
                                         }
                                     }
                                     else if (op == RELOAD) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/43834aaa/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
index b344a61..1cad356 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTestEntryEx.java
@@ -27,7 +27,6 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.cache.eviction.EvictableEntry;
 import org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion;
 import org.apache.ignite.internal.processors.cache.distributed.dht.atomic.GridDhtAtomicAbstractUpdateFuture;
-import org.apache.ignite.internal.processors.cache.mvcc.TxMvccVersion;
 import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey;
@@ -461,7 +460,7 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter implements
Gr
         String taskName,
         @Nullable GridCacheVersion dhtVer,
         @Nullable Long updateCntr,
-        @Nullable TxMvccVersion mvccVer
+        long mvccCntr
     )
         throws IgniteCheckedException, GridCacheEntryRemovedException {
         return new GridCacheUpdateTxResult(true, rawPut(val, ttl));
@@ -543,7 +542,7 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter implements
Gr
         String taskName,
         @Nullable GridCacheVersion dhtVer,
         @Nullable Long updateCntr,
-        @Nullable TxMvccVersion mvccVer
+        long mvccCntr
         ) throws IgniteCheckedException, GridCacheEntryRemovedException {
         obsoleteVer = ver;
 


Mime
View raw message