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 Thu, 22 Oct 2015 07:07:44 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1607 1aaea1646 -> 9dcbf1204


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/9dcbf120
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9dcbf120
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9dcbf120

Branch: refs/heads/ignite-1607
Commit: 9dcbf1204aa31d7155d57906f8e2792fcfe812f7
Parents: 1aaea16
Author: sboikov <sboikov@gridgain.com>
Authored: Thu Oct 22 10:07:37 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Thu Oct 22 10:07:37 2015 +0300

----------------------------------------------------------------------
 .../configuration/TransactionConfiguration.java |  6 ++--
 .../processors/cache/GridCacheAdapter.java      |  2 ++
 .../processors/cache/GridCacheEntryEx.java      |  1 +
 .../processors/cache/GridCacheMapEntry.java     |  4 +--
 .../processors/cache/GridCacheMvcc.java         |  1 +
 .../distributed/dht/GridDhtCacheAdapter.java    |  2 ++
 ...arOptimisticSerializableTxPrepareFuture.java | 31 ++++++++++++--------
 .../near/GridNearTransactionalCache.java        |  1 +
 .../cache/distributed/near/GridNearTxLocal.java |  3 +-
 .../transactions/IgniteTxLocalAdapter.java      |  1 +
 10 files changed, 35 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/9dcbf120/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
b/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
index 7d3cebb..fc2a6cb 100644
--- a/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
+++ b/modules/core/src/main/java/org/apache/ignite/configuration/TransactionConfiguration.java
@@ -92,15 +92,17 @@ public class TransactionConfiguration implements Serializable {
      *
      * @return {@code True} if serializable transactions are enabled, {@code false} otherwise.
      */
+    @Deprecated
     public boolean isTxSerializableEnabled() {
         return txSerEnabled;
     }
 
     /**
-     * Enables/disables serializable cache transactions. See {@link #isTxSerializableEnabled()}
for more information.
-     *
      * @param txSerEnabled Flag to enable/disable serializable cache transactions.
+
+     * @deprecated This method has no effect, {@link TransactionIsolation#SERIALIZABLE} isolation
is always enabled.
      */
+    @Deprecated
     public void setTxSerializableEnabled(boolean txSerEnabled) {
         this.txSerEnabled = txSerEnabled;
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/9dcbf120/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 ae3daa3..400d76e 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
@@ -1482,6 +1482,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
      * @param taskName Task name.
      * @param deserializePortable Deserialize portable.
      * @param skipVals Skip values.
+     * @param canRemap Can remap flag.
      * @return Future for the get operation.
      * @see GridCacheAdapter#getAllAsync(Collection)
      */
@@ -1521,6 +1522,7 @@ public abstract class GridCacheAdapter<K, V> implements IgniteInternalCache<K,
V
      * @param forcePrimary Froce primary.
      * @param expiry Expiry policy.
      * @param skipVals Skip values.
+     * @param canRemap Can remap flag.
      * @return Future for the get operation.
      * @see GridCacheAdapter#getAllAsync(Collection)
      */

http://git-wip-us.apache.org/repos/asf/ignite/blob/9dcbf120/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 4e9e941..0b5a859 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
@@ -438,6 +438,7 @@ public interface GridCacheEntryEx {
      * @param primary If update is performed on primary node (the one which assigns version).
      * @param checkVer Whether update should check current version and ignore update if current
version is
      *      greater than passed in.
+     * @param topVer Topology version.
      * @param filter Optional filter to check.
      * @param drType DR type.
      * @param conflictTtl Conflict TTL (if any).

http://git-wip-us.apache.org/repos/asf/ignite/blob/9dcbf120/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 a3322c5..5608b4c 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
@@ -2867,9 +2867,9 @@ public abstract class GridCacheMapEntry extends GridMetadataAwareAdapter
impleme
     /** {@inheritDoc} */
     @Override public synchronized boolean checkSerializableReadVersion(GridCacheVersion serReadVer)
         throws GridCacheEntryRemovedException {
-        if (!serReadVer.equals(ver)) {
-            checkObsolete();
+        checkObsolete();
 
+        if (!serReadVer.equals(ver)) {
             boolean empty = isStartVersion() || deletedUnlocked();
 
             if (serReadVer.equals(IgniteTxEntry.SER_READ_EMPTY_ENTRY_VER))

http://git-wip-us.apache.org/repos/asf/ignite/blob/9dcbf120/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvcc.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvcc.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvcc.java
index e9c68f6..d7aca89 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvcc.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvcc.java
@@ -531,6 +531,7 @@ public final class GridCacheMvcc {
      * @param threadId Thread ID.
      * @param ver Lock version.
      * @param timeout Lock acquisition timeout.
+     * @param serOrder Version for serializable transactions ordering.
      * @param reenter Reentry flag ({@code true} if reentry is allowed).
      * @param tx Transaction flag.
      * @param implicitSingle Implicit flag.

http://git-wip-us.apache.org/repos/asf/ignite/blob/9dcbf120/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 a3c52ab..f604f35 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
@@ -602,6 +602,7 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
      * @param taskName Task name.
      * @param expiry Expiry policy.
      * @param skipVals Skip values flag.
+     * @param canRemap Can remap flag.
      * @return Get future.
      */
     IgniteInternalFuture<Map<KeyCacheObject, T2<CacheObject, GridCacheVersion>>>
getDhtAllAsync(
@@ -635,6 +636,7 @@ public abstract class GridDhtCacheAdapter<K, V> extends GridDistributedCacheAdap
      * @param subjId Subject ID.
      * @param taskNameHash Task name hash code.
      * @param expiry Expiry policy.
+     * @param skipVals Skip values flag.
      * @return DHT future.
      */
     public GridDhtFuture<Collection<GridCacheEntryInfo>> getDhtAsync(UUID reader,

http://git-wip-us.apache.org/repos/asf/ignite/blob/9dcbf120/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
index 0330861..48e44e6 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearOptimisticSerializableTxPrepareFuture.java
@@ -24,7 +24,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicReference;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.cluster.ClusterTopologyException;
@@ -86,7 +85,7 @@ public class GridNearOptimisticSerializableTxPrepareFuture extends GridNearOptim
 
     /** */
     @GridToStringExclude
-    private final AtomicReference<ClientRemapFuture> remapFutRef;
+    private ClientRemapFuture remapFut;
 
     /**
      * @param cctx Context.
@@ -99,8 +98,6 @@ public class GridNearOptimisticSerializableTxPrepareFuture extends GridNearOptim
 
         // Should wait for all mini futures completion before finishing tx.
         ignoreChildFailures(IgniteCheckedException.class);
-
-        remapFutRef = cctx.kernalContext().clientNode() ? new AtomicReference<ClientRemapFuture>()
: null;
     }
 
     /** {@inheritDoc} */
@@ -800,20 +797,28 @@ public class GridNearOptimisticSerializableTxPrepareFuture extends GridNearOptim
 
                         tx.removeMapping(m.node().id());
 
-                        ClientRemapFuture remapFut = new ClientRemapFuture();
+                        ClientRemapFuture remapFut0 = null;
+
+                        synchronized (GridNearOptimisticSerializableTxPrepareFuture.this)
{
+                            if (remapFut == null) {
+                                remapFut = new ClientRemapFuture();
+
+                                remapFut0 = remapFut;
+                            }
+                        }
 
-                        if (remapFutRef.compareAndSet(null, remapFut)) {
+                        if (remapFut0 != null) {
                             Collection<IgniteInternalFuture<?>> futs = (Collection)futures();
 
                             for (IgniteInternalFuture<?> fut : futs) {
                                 if (isMini(fut) && fut != this)
-                                    remapFut.add((MiniFuture)fut);
+                                    remapFut0.add((MiniFuture)fut);
                             }
 
-                            remapFut.markInitialized();
+                            remapFut0.markInitialized();
 
-                            remapFut.listen(new CI1<IgniteInternalFuture<Boolean>>()
{
-                                @Override public void apply(IgniteInternalFuture<Boolean>
remapFut) {
+                            remapFut0.listen(new CI1<IgniteInternalFuture<Boolean>>()
{
+                                @Override public void apply(IgniteInternalFuture<Boolean>
remapFut0) {
                                     try {
                                         IgniteInternalFuture<?> affFut =
                                             cctx.exchange().affinityReadyFuture(res.clientRemapVersion());
@@ -828,9 +833,11 @@ public class GridNearOptimisticSerializableTxPrepareFuture extends GridNearOptim
                                                     ", topVer=" + res.topologyVersion() +
']');
                                             }
 
-                                            boolean set = remapFutRef.compareAndSet((ClientRemapFuture)remapFut,
null);
+                                            synchronized (GridNearOptimisticSerializableTxPrepareFuture.this)
{
+                                                assert remapFut0 == remapFut;
 
-                                            assert set;
+                                                remapFut = null;
+                                            }
 
                                             affFut.listen(new CI1<IgniteInternalFuture<?>>()
{
                                                 @Override public void apply(IgniteInternalFuture<?>
affFut) {

http://git-wip-us.apache.org/repos/asf/ignite/blob/9dcbf120/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
index 2473c25..00b78b3 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTransactionalCache.java
@@ -171,6 +171,7 @@ public class GridNearTransactionalCache<K, V> extends GridNearCacheAdapter<K,
V>
      * @param deserializePortable Deserialize portable flag.
      * @param expiryPlc Expiry policy.
      * @param skipVals Skip values flag.
+     * @param needVer If {@code true} returns values as tuples containing value and version.
      * @return Future.
      */
     IgniteInternalFuture<Map<K, V>> txLoadAsync(GridNearTxLocal tx,

http://git-wip-us.apache.org/repos/asf/ignite/blob/9dcbf120/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
index 35a3b22..e856b24 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxLocal.java
@@ -406,7 +406,8 @@ public class GridNearTxLocal extends GridDhtTxLocalAdapter {
                     }
                 }
             });
-        } else {
+        }
+        else {
             assert cacheCtx.isLocal();
 
             return super.loadMissing(cacheCtx, readThrough, async, keys, skipVals, needVer,
c);

http://git-wip-us.apache.org/repos/asf/ignite/blob/9dcbf120/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 d495103..6dee304 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
@@ -2014,6 +2014,7 @@ public abstract class IgniteTxLocalAdapter extends IgniteTxAdapter
      * @param drPutMap DR put map (optional).
      * @param drRmvMap DR remove map (optional).
      * @param skipStore Skip store flag.
+     * @param singleRmv {@code True} for single key remove operation ({@link Cache#remove(Object)}.
      * @return Future with skipped keys (the ones that didn't pass filter for pessimistic
transactions).
      */
     private <K, V> IgniteInternalFuture<Set<KeyCacheObject>> enlistWrite(


Mime
View raw message