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-1607 WIP
Date Mon, 26 Oct 2015 11:04:43 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1607 353249795 -> 025e62c75


ignite-1607 WIP


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

Branch: refs/heads/ignite-1607
Commit: 025e62c75bc6c6808659dbb031f293827d5a434a
Parents: 3532497
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Oct 26 13:42:26 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Oct 26 13:52:42 2015 +0300

----------------------------------------------------------------------
 .../distributed/dht/GridDhtTxPrepareFuture.java | 38 +-------------------
 .../dht/GridPartitionedGetFuture.java           |  1 -
 .../distributed/near/CacheVersionedValue.java   |  2 +-
 .../distributed/near/GridNearGetFuture.java     |  1 -
 .../distributed/near/GridNearGetRequest.java    |  3 --
 .../near/GridNearTxPrepareResponse.java         | 13 -------
 .../cache/IgniteCacheAbstractBenchmark.java     |  7 +++-
 7 files changed, 8 insertions(+), 57 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/025e62c7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxPrepareFuture.java
----------------------------------------------------------------------
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 6f8ac2e..9ae4d4c 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
@@ -50,7 +50,6 @@ import org.apache.ignite.internal.processors.cache.GridCacheSharedContext;
 import org.apache.ignite.internal.processors.cache.KeyCacheObject;
 import org.apache.ignite.internal.processors.cache.distributed.GridDistributedCacheEntry;
 import org.apache.ignite.internal.processors.cache.distributed.GridDistributedTxMapping;
-import org.apache.ignite.internal.processors.cache.distributed.near.CacheVersionedValue;
 import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxPrepareResponse;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteInternalTx;
 import org.apache.ignite.internal.processors.cache.transactions.IgniteTxEntry;
@@ -947,41 +946,6 @@ public final class GridDhtTxPrepareFuture extends GridCompoundFuture<IgniteInter
     }
 
     /**
-     * @param entries Entries.
-     * @param vals Values map.
-     * @return Value map.
-     * @throws IgniteCheckedException If failed.
-     */
-    @Nullable private Map<IgniteTxKey, CacheVersionedValue> checkReadConflict(Collection<IgniteTxEntry>
entries,
-        @Nullable Map<IgniteTxKey, CacheVersionedValue> vals) throws IgniteCheckedException
{
-        try {
-            for (IgniteTxEntry entry : entries) {
-                GridCacheVersion serReadVer = entry.serializableReadVersion();
-
-                if (serReadVer != null) {
-                    entry.cached().unswap();
-
-                    if (!entry.cached().checkSerializableReadVersion(serReadVer)) {
-                        if (vals == null)
-                            vals = U.newHashMap(3);
-
-                        GridCacheEntryInfo info = entry.cached().info();
-
-                        assert info != null : entry.cached();
-
-                        vals.put(entry.txKey(), new CacheVersionedValue(info.value(), info.version()));
-                    }
-                }
-            }
-        }
-        catch (GridCacheEntryRemovedException e) {
-            assert false : "Got removed exception on entry with dht local candidate: " +
entries;
-        }
-
-        return vals;
-    }
-
-    /**
      * @param entry Entry.
      * @return Optimistic version check error.
      */
@@ -999,7 +963,7 @@ public final class GridDhtTxPrepareFuture extends GridCompoundFuture<IgniteInter
     private void prepare0() {
         try {
             if (tx.optimistic() && tx.serializable()) {
-                IgniteCheckedException err0 = null;
+                IgniteCheckedException err0;
 
                 try {
                     err0 = checkReadConflict(writes);

http://git-wip-us.apache.org/repos/asf/ignite/blob/025e62c7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
index 8d1dde5..d7b1754 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridPartitionedGetFuture.java
@@ -346,7 +346,6 @@ public class GridPartitionedGetFuture<K, V> extends CacheDistributedGetFutureAda
                     ver,
                     mappedKeys,
                     readThrough,
-                    false,
                     topVer,
                     subjId,
                     taskName == null ? 0 : taskName.hashCode(),

http://git-wip-us.apache.org/repos/asf/ignite/blob/025e62c7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/CacheVersionedValue.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/CacheVersionedValue.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/CacheVersionedValue.java
index c14621a..1559a91 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/CacheVersionedValue.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/CacheVersionedValue.java
@@ -53,7 +53,7 @@ public class CacheVersionedValue implements Message {
      * @param val Cache value.
      * @param ver Cache version.
      */
-    public CacheVersionedValue(CacheObject val, GridCacheVersion ver) {
+    CacheVersionedValue(CacheObject val, GridCacheVersion ver) {
         this.val = val;
         this.ver = ver;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/025e62c7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
index 8dc273c..8477878 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetFuture.java
@@ -355,7 +355,6 @@ public final class GridNearGetFuture<K, V> extends CacheDistributedGetFutureAdap
                     ver,
                     mappedKeys,
                     readThrough,
-                    false,
                     topVer,
                     subjId,
                     taskName == null ? 0 : taskName.hashCode(),

http://git-wip-us.apache.org/repos/asf/ignite/blob/025e62c7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
index 9bd2a68..9ff1428 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearGetRequest.java
@@ -109,7 +109,6 @@ public class GridNearGetRequest extends GridCacheMessage implements GridCacheDep
      * @param ver Version.
      * @param keys Keys.
      * @param readThrough Read through flag.
-     * @param reload Reload flag.
      * @param skipVals Skip values flag. When false, only boolean values will be returned
indicating whether
      *      cache entry has a value.
      * @param topVer Topology version.
@@ -124,7 +123,6 @@ public class GridNearGetRequest extends GridCacheMessage implements GridCacheDep
         GridCacheVersion ver,
         LinkedHashMap<KeyCacheObject, Boolean> keys,
         boolean readThrough,
-        boolean reload,
         @NotNull AffinityTopologyVersion topVer,
         UUID subjId,
         int taskNameHash,
@@ -143,7 +141,6 @@ public class GridNearGetRequest extends GridCacheMessage implements GridCacheDep
         this.keys = keys.keySet();
         this.flags = keys.values();
         this.readThrough = readThrough;
-        this.reload = reload;
         this.topVer = topVer;
         this.subjId = subjId;
         this.taskNameHash = taskNameHash;

http://git-wip-us.apache.org/repos/asf/ignite/blob/025e62c7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
index 6a914ca..6558f97 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareResponse.java
@@ -197,19 +197,6 @@ public class GridNearTxPrepareResponse extends GridDistributedTxPrepareResponse
      * Adds owned value.
      *
      * @param key Key.
-     * @param val Versioned value.
-     */
-    public void addOwnedValue(IgniteTxKey key, CacheVersionedValue val) {
-        if (ownedVals == null)
-            ownedVals = new HashMap<>();
-
-        ownedVals.put(key, val);
-    }
-
-    /**
-     * Adds owned value.
-     *
-     * @param key Key.
      * @param ver DHT version.
      * @param val Value.
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/025e62c7/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteCacheAbstractBenchmark.java
----------------------------------------------------------------------
diff --git a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteCacheAbstractBenchmark.java
b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteCacheAbstractBenchmark.java
index 1260f9c..22a9eac 100644
--- a/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteCacheAbstractBenchmark.java
+++ b/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgniteCacheAbstractBenchmark.java
@@ -88,6 +88,9 @@ public abstract class IgniteCacheAbstractBenchmark extends IgniteAbstractBenchma
         /** */
         final int max;
 
+        /** */
+        final ThreadLocalRandom rnd;
+
         /**
          * @param min Min.
          * @param max Max.
@@ -95,13 +98,15 @@ public abstract class IgniteCacheAbstractBenchmark extends IgniteAbstractBenchma
         private ThreadRange(int min, int max) {
             this.min = min;
             this.max = max;
+
+            rnd = ThreadLocalRandom.current();
         }
 
         /**
          * @return Next random key.
          */
         int nextRandom() {
-            return ThreadLocalRandom.current().nextInt(min, max);
+            return rnd.nextInt(min, max);
         }
     }
 }
\ No newline at end of file


Mime
View raw message