ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [19/20] incubator-ignite git commit: # ignite-629-1 review
Date Mon, 30 Mar 2015 09:42:42 GMT
# ignite-629-1 review


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

Branch: refs/heads/ignite-629-1
Commit: 2415712ac711ae3deaa624b8bd9efd598aa33fa2
Parents: c4bef11
Author: sboikov <sboikov@gridgain.com>
Authored: Mon Mar 30 12:31:08 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Mon Mar 30 12:37:28 2015 +0300

----------------------------------------------------------------------
 .../processors/cache/CacheProjection.java       |  2 +-
 .../processors/cache/GridCacheAdapter.java      | 28 +++---
 .../processors/cache/GridCacheEntryEx.java      |  3 +-
 .../processors/cache/GridCacheMapEntry.java     | 18 ++--
 .../cache/GridCacheProjectionImpl.java          | 14 +--
 .../processors/cache/GridCacheProxyImpl.java    |  3 +-
 .../processors/cache/IgniteCacheProxy.java      |  7 +-
 .../GridDistributedTxRemoteAdapter.java         |  2 +-
 .../distributed/dht/GridDhtCacheAdapter.java    |  2 +-
 .../distributed/dht/GridDhtLocalPartition.java  |  2 +-
 .../distributed/dht/GridDhtLockFuture.java      |  2 +-
 .../distributed/dht/GridDhtTxLocalAdapter.java  |  2 +-
 .../distributed/dht/GridDhtTxPrepareFuture.java |  2 +-
 .../colocated/GridDhtDetachedCacheEntry.java    |  2 +-
 .../transactions/IgniteTxLocalAdapter.java      |  6 +-
 .../datastreamer/DataStreamerImpl.java          |  2 +-
 .../GridCacheAtomicReferenceImpl.java           |  2 -
 .../GridCacheAtomicStampedImpl.java             |  2 -
 .../handlers/cache/GridCacheCommandHandler.java | 27 +++---
 .../processors/cache/GridCacheTestEntryEx.java  |  2 +-
 .../cache/IgniteCacheInvokeAbstractTest.java    |  6 +-
 ...GridCacheValueConsistencyAtomicSelfTest.java | 98 --------------------
 22 files changed, 61 insertions(+), 173 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
index fb51620..6189d6b 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/CacheProjection.java
@@ -242,7 +242,7 @@ public interface CacheProjection<K, V> extends Iterable<Cache.Entry<K,
V>> {
 
     /**
      * @param skipStore Skip store.
-     * @retur New projection based on this one, but with skip store.
+     * @return New projection based on this one, but with skip store.
      */
     public CacheProjection<K, V> setSkipStore(boolean skipStore);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
index 864d6b2..db1fd12 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheAdapter.java
@@ -407,12 +407,12 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
             return this;
 
         GridCacheProjectionImpl<K, V> prj = new GridCacheProjectionImpl<>(this,
-                ctx,
-                null,
-                skipStore,
-                null,
-                false,
-                null);
+            ctx,
+            null,
+            skipStore,
+            null,
+            false,
+            null);
 
         return new GridCacheProxyImpl<>(ctx, prj, prj);
     }
@@ -1602,8 +1602,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
 
         return getAllAsync(Collections.singletonList(key), /*force primary*/true, /*skip
tx*/false, null, null,
             taskName, true, false).chain(new CX1<IgniteInternalFuture<Map<K, V>>,
V>() {
-            @Override
-            public V applyx(IgniteInternalFuture<Map<K, V>> e) throws IgniteCheckedException
{
+            @Override public V applyx(IgniteInternalFuture<Map<K, V>> e) throws
IgniteCheckedException {
                 return e.get().get(key);
             }
         });
@@ -2458,13 +2457,11 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
         ctx.dr().onReceiveCacheEntriesReceived(drMap.size());
 
         return asyncOp(new AsyncInOp(drMap.keySet()) {
-            @Override
-            public IgniteInternalFuture<?> inOp(IgniteTxLocalAdapter tx) {
+            @Override public IgniteInternalFuture<?> inOp(IgniteTxLocalAdapter tx)
{
                 return tx.putAllDrAsync(ctx, drMap);
             }
 
-            @Override
-            public String toString() {
+            @Override public String toString() {
                 return "putAllConflictAsync [drMap=" + drMap + ']';
             }
         });
@@ -2513,9 +2510,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
             validateCacheKeys(keys);
 
         return syncOp(new SyncOp<Map<K, EntryProcessorResult<T>>>(keys.size()
== 1) {
-            @Nullable
-            @Override
-            public Map<K, EntryProcessorResult<T>> op(IgniteTxLocalAdapter tx)
+            @Nullable @Override public Map<K, EntryProcessorResult<T>> op(IgniteTxLocalAdapter
tx)
                     throws IgniteCheckedException {
                 Map<? extends K, EntryProcessor<K, V, Object>> invokeMap = F.viewAsMap(keys,
                         new C1<K, EntryProcessor<K, V, Object>>() {
@@ -2703,8 +2698,7 @@ public abstract class GridCacheAdapter<K, V> implements GridCache<K,
V>,
                     (IgniteClosure<IgniteInternalFuture<GridCacheReturn>, Boolean>)
RET2FLAG);
             }
 
-            @Override
-            public String toString() {
+            @Override public String toString() {
                 return "putxAsync [key=" + key + ", val=" + val + ", filter=" + Arrays.toString(filter)
+ ']';
             }
         });

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/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 d0c701c..10176d9 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
@@ -901,12 +901,11 @@ public interface GridCacheEntryEx {
     /**
      * Unswap ignoring flags.
      *
-     * @param ignoreFlags Whether to ignore swap flags.
      * @param needVal If {@code false} then do not need to deserialize value during unswap.
      * @return Value.
      * @throws IgniteCheckedException If failed.
      */
-    @Nullable public CacheObject unswap(boolean ignoreFlags, boolean needVal) throws IgniteCheckedException;
+    @Nullable public CacheObject unswap(boolean needVal) throws IgniteCheckedException;
 
     /**
      * Tests whether or not given metadata is set.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/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 6e2dcbd..58ff57f 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
@@ -414,18 +414,17 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx
{
 
     /** {@inheritDoc} */
     @Override public CacheObject unswap() throws IgniteCheckedException {
-        return unswap(false, true);
+        return unswap(true);
     }
 
     /**
      * Unswaps an entry.
      *
-     * @param ignoreFlags Whether to ignore swap flags.
      * @param needVal If {@code false} then do not to deserialize value during unswap.
      * @return Value.
      * @throws IgniteCheckedException If failed.
      */
-    @Nullable @Override public CacheObject unswap(boolean ignoreFlags, boolean needVal) throws
IgniteCheckedException {
+    @Nullable @Override public CacheObject unswap(boolean needVal) throws IgniteCheckedException
{
         boolean swapEnabled = cctx.swap().swapEnabled();
 
         if (!swapEnabled && !cctx.isOffHeapEnabled())
@@ -700,7 +699,7 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx {
                     else {
                         // Read and remove swap entry.
                         if (tmp) {
-                            unswap(false, false);
+                            unswap(false);
 
                             val = rawGetOrUnmarshalUnlocked(true);
                         }
@@ -982,7 +981,7 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx {
             boolean startVer = isStartVersion();
 
             if (startVer)
-                unswap(true, retval);
+                unswap(retval);
 
             newVer = explicitVer != null ? explicitVer : tx == null ?
                 nextVersion() : tx.writeVersion();
@@ -1316,7 +1315,7 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx
{
 
             // Load and remove from swap if it is new.
             if (isNew())
-                unswap(true, retval);
+                unswap(retval);
 
             // Possibly get old value form store.
             old = needVal ? rawGetOrUnmarshalUnlocked(!retval) : val;
@@ -1639,7 +1638,7 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx
{
 
             // Load and remove from swap if it is new.
             if (isNew())
-                unswap(true, retval);
+                unswap(retval);
 
             Object transformClo = null;
 
@@ -2313,6 +2312,7 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx
{
 
     /**
      * @param nodeId Node ID to clear.
+     * @throws GridCacheEntryRemovedException If removed.
      */
     protected void clearReader(UUID nodeId) throws GridCacheEntryRemovedException {
         // No-op.
@@ -2901,7 +2901,7 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx
{
             checkObsolete();
 
             if (isNew() || !valid(AffinityTopologyVersion.NONE))
-                unswap(true, true);
+                unswap(true);
 
             if (deletedUnlocked())
                 return null;
@@ -3265,7 +3265,7 @@ public abstract class GridCacheMapEntry implements GridCacheEntryEx
{
     @Override public synchronized GridCacheVersionedEntryEx versionedEntry() throws IgniteCheckedException
{
         boolean isNew = isStartVersion();
 
-        CacheObject val = isNew ? unswap(true, true) : rawGetOrUnmarshalUnlocked(false);
+        CacheObject val = isNew ? unswap(true) : rawGetOrUnmarshalUnlocked(false);
 
         return new GridCachePlainVersionedEntry<>(key.value(cctx.cacheObjectContext(),
true),
             CU.value(val, cctx, true),

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
index b3367ca..3517b42 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProjectionImpl.java
@@ -336,12 +336,12 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K,
V
             return new GridCacheProxyImpl<>(cctx, this, this);
 
         GridCacheProjectionImpl<K, V> prj = new GridCacheProjectionImpl<>(this,
-                cctx,
-                filter,
-                skipStore,
-                subjId,
-                keepPortable,
-                expiryPlc);
+            cctx,
+            filter,
+            skipStore,
+            subjId,
+            keepPortable,
+            expiryPlc);
 
         return new GridCacheProxyImpl<>(cctx, prj, prj);
     }
@@ -746,7 +746,7 @@ public class GridCacheProjectionImpl<K, V> implements GridCacheProjectionEx<K,
V
 
     /** {@inheritDoc} */
     @Override public boolean skipStore() {
-        return false;
+        return skipStore;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
index bd2aa31..79cf9b2 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProxyImpl.java
@@ -290,7 +290,8 @@ public class GridCacheProxyImpl<K, V> implements GridCacheProxy<K,
V>, Externali
 
         try {
             return cache.toMap();
-        } finally {
+        }
+        finally {
             gate.leave(prev);
         }
     }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
index 2196fba..aba0c73 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/IgniteCacheProxy.java
@@ -1407,8 +1407,7 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
         GridCacheProjectionImpl<K, V> prev = gate.enter(prj);
 
         try {
-
-            boolean skip = prj != null ? prj.skipStore() : false;
+            boolean skip = prj != null && prj.skipStore();
 
             if (skip)
                 return this;
@@ -1417,9 +1416,9 @@ public class IgniteCacheProxy<K, V> extends AsyncSupportAdapter<IgniteCache<K,
V
                 (prj != null ? prj : delegate),
                 ctx,
                 null,
-                skip,
-                prj != null ? prj.subjectId() : null,
                 true,
+                prj != null ? prj.subjectId() : null,
+                prj != null && prj.isKeepPortable(),
                 prj != null ? prj.expiry() : null);
 
             return new IgniteCacheProxy<>(ctx,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/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 51d85a7..5fdc1e4 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
@@ -502,7 +502,7 @@ public class GridDistributedTxRemoteAdapter extends IgniteTxAdapter
                                         nearCached = cacheCtx.dht().near().peekExx(txEntry.key());
 
                                     if (!F.isEmpty(txEntry.entryProcessors()) || !F.isEmpty(txEntry.filters()))
-                                        txEntry.cached().unswap(true, false);
+                                        txEntry.cached().unswap(false);
 
                                     IgniteBiTuple<GridCacheOperation, CacheObject>
res =
                                         applyTransformClosures(txEntry, false);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
index 4d90f89..6c27566 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtCacheAdapter.java
@@ -776,7 +776,7 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
                     if (swap) {
                         entry = cache.entryEx(keys.get(i));
 
-                        entry.unswap(true, false);
+                        entry.unswap(false);
                     }
                     else
                         entry = cache.peekEx(keys.get(i));

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
index c1091e8..4e72bd1 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLocalPartition.java
@@ -616,7 +616,7 @@ public class GridDhtLocalPartition implements Comparable<GridDhtLocalPartition>
 
                     lastEntry = (GridDhtCacheEntry)cctx.cache().entryEx(key, false);
 
-                    lastEntry.unswap(true, true);
+                    lastEntry.unswap(true);
 
                     return lastEntry;
                 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
index 718e565..99fb724 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtLockFuture.java
@@ -830,7 +830,7 @@ public final class GridDhtLockFuture<K, V> extends GridCompoundIdentityFuture<Bo
                             GridDhtCacheEntry e = it.next();
 
                             // Must unswap entry so that isNewLocked returns correct value.
-                            e.unswap(true, false);
+                            e.unswap(false);
 
                             boolean needVal = false;
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtTxLocalAdapter.java
----------------------------------------------------------------------
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 d76a730..5e37d96 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
@@ -548,7 +548,7 @@ public abstract class GridDhtTxLocalAdapter extends IgniteTxLocalAdapter
{
 
                     addActiveCache(dhtCache.context());
 
-                    cached.unswap(!read, read);
+                    cached.unswap(read);
 
                     txEntry = addEntry(NOOP,
                         null,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/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 9e23742..e0fc719 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
@@ -293,7 +293,7 @@ public final class GridDhtTxPrepareFuture<K, V> extends GridCompoundIdentityFutu
                 boolean hasFilters = !F.isEmptyOrNulls(txEntry.filters()) && !F.isAlwaysTrue(txEntry.filters());
 
                 if (hasFilters || retVal || txEntry.op() == GridCacheOperation.DELETE) {
-                    cached.unswap(true, retVal);
+                    cached.unswap(retVal);
 
                     CacheObject val = cached.innerGet(
                         tx,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtDetachedCacheEntry.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtDetachedCacheEntry.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtDetachedCacheEntry.java
index 154d99e..77547db 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtDetachedCacheEntry.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/colocated/GridDhtDetachedCacheEntry.java
@@ -57,7 +57,7 @@ public class GridDhtDetachedCacheEntry extends GridDistributedCacheEntry
{
     }
 
     /** {@inheritDoc} */
-    @Nullable @Override public CacheObject unswap(boolean ignoreFlags, boolean needVal) throws
IgniteCheckedException {
+    @Nullable @Override public CacheObject unswap(boolean needVal) throws IgniteCheckedException
{
         return null;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/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 ca85838..40f37ed 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
@@ -511,7 +511,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                         boolean intercept = e.context().config().getInterceptor() != null;
 
                         if (intercept || !F.isEmpty(e.entryProcessors()))
-                            e.cached().unswap(true, false);
+                            e.cached().unswap(false);
 
                         IgniteBiTuple<GridCacheOperation, CacheObject> res = applyTransformClosures(e,
false);
 
@@ -722,7 +722,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                                     boolean evt = !isNearLocallyMapped(txEntry, false);
 
                                     if (!F.isEmpty(txEntry.entryProcessors()) || !F.isEmpty(txEntry.filters()))
-                                        txEntry.cached().unswap(true, false);
+                                        txEntry.cached().unswap(false);
 
                                     IgniteBiTuple<GridCacheOperation, CacheObject>
res = applyTransformClosures(txEntry,
                                         true);
@@ -2065,7 +2065,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
                         else {
                             entry = entryEx(cacheCtx, txKey, topologyVersion());
 
-                            entry.unswap(true, false);
+                            entry.unswap(false);
                         }
 
                         try {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
index 7d5bff2..71a9364 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastreamer/DataStreamerImpl.java
@@ -1396,7 +1396,7 @@ public class DataStreamerImpl<K, V> implements IgniteDataStreamer<K,
V>, Delayed
 
                         GridCacheEntryEx entry = internalCache.entryEx(e.getKey(), topVer);
 
-                        entry.unswap(true, false);
+                        entry.unswap(false);
 
                         entry.initialValue(e.getValue(),
                             ver,

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicReferenceImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicReferenceImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicReferenceImpl.java
index f8c71a7..4a4efdd 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicReferenceImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicReferenceImpl.java
@@ -18,8 +18,6 @@
 package org.apache.ignite.internal.processors.datastructures;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.transactions.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java
index 92e97cc..64f32fc 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/datastructures/GridCacheAtomicStampedImpl.java
@@ -18,8 +18,6 @@
 package org.apache.ignite.internal.processors.datastructures;
 
 import org.apache.ignite.*;
-import org.apache.ignite.cache.CacheAtomicityMode;
-import org.apache.ignite.cache.CacheMode;
 import org.apache.ignite.internal.*;
 import org.apache.ignite.internal.processors.cache.*;
 import org.apache.ignite.internal.processors.cache.transactions.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
index 549662e..854d991 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/rest/handlers/cache/GridCacheCommandHandler.java
@@ -97,7 +97,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter
{
      * Retrieves cache flags from corresponding bits.
      *
      * @param cacheFlagsBits Integer representation of cache flags bit set.
-     * @return Array of cache flags.
+     * @return Skip store flag.
      */
     public static boolean parseCacheFlags(int cacheFlagsBits) {
         if (cacheFlagsBits == 0)
@@ -124,8 +124,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter
{
 
         final Object key = req0.key();
 
-        final boolean skip= parseCacheFlags(req0.cacheFlags());
-
+        final boolean skipStore = parseCacheFlags(req0.cacheFlags());
 
         try {
             GridRestCommand cmd = req0.command();
@@ -139,7 +138,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter
{
 
             switch (cmd) {
                 case CACHE_GET: {
-                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skip, key,
+                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skipStore, key,
                         new GetCommand(key));
 
                     break;
@@ -161,7 +160,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter
{
                         keys0.add(getKey);
                     }
 
-                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skip, key,
+                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skipStore, key,
                         new GetAllCommand(keys0));
 
                     break;
@@ -173,7 +172,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter
{
                     if (val == null)
                         throw new IgniteCheckedException(GridRestCommandHandlerAdapter.missingParameter("val"));
 
-                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skip, key, new
+                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skipStore, key, new
                         PutCommand(key, ttl, val));
 
                     break;
@@ -185,7 +184,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter
{
                     if (val == null)
                         throw new IgniteCheckedException(GridRestCommandHandlerAdapter.missingParameter("val"));
 
-                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skip, key,
+                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skipStore, key,
                         new AddCommand(key, ttl, val));
 
                     break;
@@ -208,14 +207,14 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter
{
                     // HashMap wrapping for correct serialization
                     map = new HashMap<>(map);
 
-                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skip, key,
+                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skipStore, key,
                         new PutAllCommand(map));
 
                     break;
                 }
 
                 case CACHE_REMOVE: {
-                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skip, key,
+                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skipStore, key,
                         new RemoveCommand(key));
 
                     break;
@@ -227,7 +226,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter
{
                     // HashSet wrapping for correct serialization
                     Set<Object> keys = map == null ? null : new HashSet<>(map.keySet());
 
-                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skip, key,
+                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skipStore, key,
                         new RemoveAllCommand(keys));
 
                     break;
@@ -239,7 +238,7 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter
{
                     if (val == null)
                         throw new IgniteCheckedException(GridRestCommandHandlerAdapter.missingParameter("val"));
 
-                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skip, key,
+                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skipStore, key,
                         new ReplaceCommand(key, ttl, val));
 
                     break;
@@ -249,21 +248,21 @@ public class GridCacheCommandHandler extends GridRestCommandHandlerAdapter
{
                     final Object val1 = req0.value();
                     final Object val2 = req0.value2();
 
-                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skip, key,
+                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skipStore, key,
                         new CasCommand(val2, val1, key));
 
                     break;
                 }
 
                 case CACHE_APPEND: {
-                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skip, key,
+                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skipStore, key,
                         new AppendCommand(key, req0));
 
                     break;
                 }
 
                 case CACHE_PREPEND: {
-                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skip, key,
+                    fut = executeCommand(req.destinationId(), req.clientId(), cacheName,
skipStore, key,
                         new PrependCommand(key, req0));
 
                     break;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/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 345b6c6..1d86984 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
@@ -826,7 +826,7 @@ public class GridCacheTestEntryEx extends GridMetadataAwareAdapter implements
Gr
     }
 
     /** {@inheritDoc} */
-    @Override public CacheObject unswap(boolean ignoreFlags, boolean needVal) throws IgniteCheckedException
{
+    @Override public CacheObject unswap(boolean needVal) throws IgniteCheckedException {
         return null;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
index 6cbb287..a91aca7 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheInvokeAbstractTest.java
@@ -55,9 +55,8 @@ public abstract class IgniteCacheInvokeAbstractTest extends IgniteCacheAbstractT
 
             invoke(cache, OPTIMISTIC);
         }
-        else if (gridCount() > 1) {
+        else if (gridCount() > 1)
             invoke(cache, null);
-        }
     }
 
     /**
@@ -182,9 +181,8 @@ public abstract class IgniteCacheInvokeAbstractTest extends IgniteCacheAbstractT
 
             invokeAll(cache, OPTIMISTIC);
         }
-        else if (gridCount() > 1) {
+        else if (gridCount() > 1)
             invokeAll(cache, null);
-        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/2415712a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheValueConsistencyAtomicSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheValueConsistencyAtomicSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheValueConsistencyAtomicSelfTest.java
index 4166369..5f5e715 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheValueConsistencyAtomicSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/dht/atomic/GridCacheValueConsistencyAtomicSelfTest.java
@@ -17,16 +17,8 @@
 
 package org.apache.ignite.internal.processors.cache.distributed.dht.atomic;
 
-import org.apache.ignite.*;
 import org.apache.ignite.cache.*;
 import org.apache.ignite.internal.processors.cache.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
-import org.apache.ignite.testframework.*;
-import org.jsr166.*;
-
-import javax.cache.processor.*;
-import java.io.*;
-import java.util.concurrent.atomic.*;
 
 import static org.apache.ignite.cache.CacheAtomicityMode.*;
 
@@ -43,94 +35,4 @@ public class GridCacheValueConsistencyAtomicSelfTest extends GridCacheValueConsi
     @Override protected int iterationCount() {
         return 100_000;
     }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testForceTransformBackupConsistency() throws Exception {
-        U.sleep(1000);
-
-        int keyCnt = iterationCount() / 10;
-
-        int threadCnt = 8;
-
-        final int range = keyCnt / threadCnt;
-
-        for (int r = 1; r < 5; r++) {
-            final AtomicInteger rangeIdx = new AtomicInteger();
-
-            info(">>>>>> Running iteration: " + r);
-
-            GridTestUtils.runMultiThreaded(new Runnable() {
-                @Override public void run() {
-                    try {
-                        int rangeStart = rangeIdx.getAndIncrement() * range;
-
-                        info("Got range [" + rangeStart + ", " + (rangeStart + range) + ")");
-
-                        for (int i = rangeStart; i < rangeStart + range; i++) {
-                            int idx = ThreadLocalRandom8.current().nextInt(gridCount());
-
-                            IgniteCache<Integer, Integer> cache = grid(idx).cache(null);
-
-                            cache.invoke(i, new Transformer(i));
-                        }
-                    }
-                    catch (Exception e) {
-                        throw new IgniteException(e);
-                    }
-                }
-            }, threadCnt, "runner");
-
-            info("Finished run, checking values.");
-
-            U.sleep(500);
-
-            int total = 0;
-
-            for (int idx = 0; idx < gridCount(); idx++) {
-                IgniteCache<Integer, Integer> cache = grid(idx).cache(null);
-
-                for (int i = 0; i < keyCnt; i++) {
-                    Integer val = cache.localPeek(i, CachePeekMode.ONHEAP);
-
-                    if (val != null) {
-                        assertEquals("Invalid value for key: " + i, (Integer)r, val);
-
-                        total++;
-                    }
-                }
-            }
-
-            assertTrue("Total keys: " + total, total >= keyCnt * 2); // 1 backup.
-        }
-    }
-
-    /**
-     *
-     */
-    private static class Transformer implements EntryProcessor<Integer, Integer, Void>,
Serializable {
-        /** */
-        private int key;
-
-        /**
-         * @param key Key.
-         */
-        private Transformer(int key) {
-            this.key = key;
-        }
-
-        /** {@inheritDoc} */
-        @Override public Void process(MutableEntry<Integer, Integer> e, Object... args)
{
-            Integer old = e.getValue();
-
-            if (key < 5)
-                System.err.println(Thread.currentThread().getName() + " <> Transforming
value [key=" + key +
-                    ", val=" + old + ']');
-
-            e.setValue(old == null ? 1 : old + 1);
-
-            return null;
-        }
-    }
 }


Mime
View raw message