ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [12/17] ignite git commit: Merge remote-tracking branch 'remotes/origin/master' into ignite-5578
Date Wed, 02 Aug 2017 10:38:30 GMT
Merge remote-tracking branch 'remotes/origin/master' into ignite-5578

# Conflicts:
#	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
#	modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite6.java


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

Branch: refs/heads/ignite-5578-debug
Commit: 2d4b1940fca80bb5f3d86ae8b5a38544e4a94d7f
Parents: 1e9602f 20d9ad5
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Aug 2 12:02:51 2017 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Aug 2 12:02:51 2017 +0300

----------------------------------------------------------------------
 .../ignite/tests/utils/TestTransaction.java     |  10 +
 .../processors/cache/GridCacheMapEntry.java     |   3 +
 .../cache/GridCacheSharedContext.java           |  24 +
 .../dht/GridDhtPartitionTopology.java           |   4 +-
 .../dht/GridDhtPartitionTopologyImpl.java       |  21 +-
 .../distributed/dht/GridDhtTxPrepareFuture.java |  25 +-
 .../distributed/near/GridNearCacheEntry.java    |   2 +-
 .../cache/distributed/near/GridNearTxLocal.java |  51 ++
 .../near/GridNearTxPrepareRequest.java          |   8 +-
 .../store/GridCacheStoreManagerAdapter.java     |  10 +
 .../cache/transactions/IgniteTxAdapter.java     |  20 +-
 .../cache/transactions/IgniteTxManager.java     |  77 +-
 .../cache/transactions/IgniteTxMap.java         |   2 +-
 .../transactions/TransactionProxyImpl.java      |  46 +-
 .../apache/ignite/transactions/Transaction.java |  14 +
 .../ignite/transactions/TransactionState.java   |   7 +-
 ...ptimisticTxSuspendResumeMultiServerTest.java |  30 +
 .../IgniteOptimisticTxSuspendResumeTest.java    | 751 +++++++++++++++++++
 .../IgnitePessimisticTxSuspendResumeTest.java   |  91 +++
 .../IgniteRejectConnectOnNodeStopTest.java      |   7 +-
 .../ignite/testframework/GridTestUtils.java     |  26 +
 .../testframework/junits/GridAbstractTest.java  |   3 +-
 .../cache/GridAbstractCacheStoreSelfTest.java   |  10 +
 .../testsuites/IgniteCacheTestSuite6.java       |   7 +
 .../processors/cache/jta/CacheJtaManager.java   |   5 +-
 .../processors/cache/jta/CacheJtaResource.java  |  28 +-
 .../GridJtaTransactionManagerSelfTest.java      | 208 +++++
 .../ignite/testsuites/IgniteJtaTestSuite.java   |   3 +
 28 files changed, 1459 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/2d4b1940/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMapEntry.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2d4b1940/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopology.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2d4b1940/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
index d3f1e94,880a102..ab0aec7
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/GridDhtPartitionTopologyImpl.java
@@@ -667,7 -621,12 +664,12 @@@ public class GridDhtPartitionTopologyIm
                  }
              }
  
-             updateRebalanceVersion(grp.affinity().readyAssignments(topVer));
 -            List<List<ClusterNode>> aff = grp.affinity().assignments(topVer);
++            List<List<ClusterNode>> aff = grp.affinity().readyAssignments(topVer);
+ 
+             updateRebalanceVersion(aff);
+ 
+             if (node2part != null && node2part.valid())
+                 changed |= checkEvictions(updateSeq, aff);
  
              consistencyCheck();
          }
@@@ -787,11 -746,12 +789,12 @@@
                  if (!belongs)
                      throw new GridDhtInvalidPartitionException(p, "Adding entry to evicted
partition " +
                          "(often may be caused by inconsistent 'key.hashCode()' implementation)
" +
 -                        "[part=" + p + ", topVer=" + topVer + ", this.topVer=" + this.topVer
+ ']');
 +                        "[part=" + p + ", topVer=" + topVer + ", this.topVer=" + this.readyTopVer
+ ']');
              }
              else if (loc != null && state == RENTING && !showRenting)
-                 throw new GridDhtInvalidPartitionException(p, "Adding entry to partition
that is concurrently evicted " +
-                     "[part=" + p + ", shouldBeMoving=" + loc.reload() + "]");
+                 throw new GridDhtInvalidPartitionException(p, "Adding entry to partition
that is concurrently " +
+                     "evicted [part=" + p + ", shouldBeMoving=" + loc.reload() + ", belongs="
+ belongs +
+                     ", topVer=" + topVer + ", curTopVer=" + this.topVer + "]");
  
              if (loc == null) {
                  if (!belongs)
@@@ -1377,10 -1312,11 +1380,11 @@@
  
              long updateSeq = this.updateSeq.incrementAndGet();
  
 -            if (!affVer.equals(AffinityTopologyVersion.NONE) && affVer.compareTo(topVer)
>= 0) {
 -                List<List<ClusterNode>> aff = grp.affinity().assignments(topVer);
 +            if (readyTopVer.initialized() && readyTopVer.equals(lastTopChangeVer))
{
 +                List<List<ClusterNode>> aff = grp.affinity().readyAssignments(readyTopVer);
  
-                 changed |= checkEvictions(updateSeq, readyTopVer, aff);
+                 if (exchangeVer == null)
 -                    changed |= checkEvictions(updateSeq, aff);
++                    changed |= checkEvictions(updateSeq, readyTopVer, aff);
  
                  updateRebalanceVersion(aff);
              }
@@@ -1536,57 -1455,58 +1540,58 @@@
  
              node2part.put(parts.nodeId(), parts);
  
 -            AffinityTopologyVersion affVer = grp.affinity().lastVersion();
 -
 -            if (affVer.compareTo(diffFromAffinityVer) >= 0) {
 -                AffinityAssignment affAssignment = grp.affinity().cachedAffinity(affVer);
 -
 -                // Add new mappings.
 -                for (Map.Entry<Integer, GridDhtPartitionState> e : parts.entrySet())
{
 -                    int p = e.getKey();
 +            // During exchange calculate diff after all messages are received and affinity
initialized.
 +            if (exchId == null) {
 +                if (readyTopVer.initialized() && readyTopVer.compareTo(diffFromAffinityVer)
>= 0) {
 +                    AffinityAssignment affAssignment = grp.affinity().readyAffinity(readyTopVer);
  
 -                    Set<UUID> diffIds = diffFromAffinity.get(p);
 +                    // Add new mappings.
 +                    for (Map.Entry<Integer, GridDhtPartitionState> e : parts.entrySet())
{
 +                        int p = e.getKey();
  
 -                    if ((e.getValue() == MOVING || e.getValue() == OWNING || e.getValue()
== RENTING)
 -                        && !affAssignment.getIds(p).contains(parts.nodeId())) {
 -                        if (diffIds == null)
 -                            diffFromAffinity.put(p, diffIds = U.newHashSet(3));
 +                        Set<UUID> diffIds = diffFromAffinity.get(p);
  
 -                        if (diffIds.add(parts.nodeId()))
 -                            changed = true;
 -                    }
 -                    else {
 -                        if (diffIds != null && diffIds.remove(parts.nodeId())) {
 -                            changed = true;
 +                        if ((e.getValue() == MOVING || e.getValue() == OWNING || e.getValue()
== RENTING)
 +                            && !affAssignment.getIds(p).contains(parts.nodeId()))
{
 +                            if (diffIds == null)
 +                                diffFromAffinity.put(p, diffIds = U.newHashSet(3));
  
 -                            if (diffIds.isEmpty())
 -                                diffFromAffinity.remove(p);
 +                            if (diffIds.add(parts.nodeId()))
 +                                changed = true;
                          }
 +                        else {
 +                            if (diffIds != null && diffIds.remove(parts.nodeId()))
{
 +                                changed = true;
  
 +                                if (diffIds.isEmpty())
 +                                    diffFromAffinity.remove(p);
 +                            }
 +                        }
                      }
 -                }
  
 -                // Remove obsolete mappings.
 -                if (cur != null) {
 -                    for (Integer p : F.view(cur.keySet(), F0.notIn(parts.keySet()))) {
 -                        Set<UUID> ids = diffFromAffinity.get(p);
 +                    // Remove obsolete mappings.
 +                    if (cur != null) {
 +                        for (Integer p : F.view(cur.keySet(), F0.notIn(parts.keySet())))
{
 +                            Set<UUID> ids = diffFromAffinity.get(p);
  
 -                        if (ids != null && ids.remove(parts.nodeId())) {
 -                            changed = true;
 +                            if (ids != null && ids.remove(parts.nodeId())) {
 +                                changed = true;
  
 -                            if (ids.isEmpty())
 -                                diffFromAffinity.remove(p);
 +                                if (ids.isEmpty())
 +                                    diffFromAffinity.remove(p);
 +                            }
                          }
                      }
 -                }
  
 -                diffFromAffinityVer = affVer;
 +                    diffFromAffinityVer = readyTopVer;
 +                }
              }
  
 -            if (!affVer.equals(AffinityTopologyVersion.NONE) && affVer.compareTo(topVer)
>= 0) {
 -                List<List<ClusterNode>> aff = grp.affinity().assignments(topVer);
 +            if (readyTopVer.initialized() && readyTopVer.equals(lastTopChangeVer))
{
 +                List<List<ClusterNode>> aff = grp.affinity().assignments(readyTopVer);
  
-                 changed |= checkEvictions(updateSeq, readyTopVer, aff);
+                 if (exchId == null)
 -                    changed |= checkEvictions(updateSeq, aff);
++                    changed |= checkEvictions(updateSeq, readyTopVer, aff);
  
                  updateRebalanceVersion(aff);
              }

http://git-wip-us.apache.org/repos/asf/ignite/blob/2d4b1940/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxPrepareRequest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2d4b1940/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxAdapter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/2d4b1940/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite6.java
----------------------------------------------------------------------
diff --cc modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite6.java
index a0b4c8d,771e974..86725e1
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite6.java
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteCacheTestSuite6.java
@@@ -18,8 -18,10 +18,11 @@@
  package org.apache.ignite.testsuites;
  
  import junit.framework.TestSuite;
 +import org.apache.ignite.internal.processors.cache.distributed.CacheExchangeMergeTest;
  import org.apache.ignite.internal.processors.cache.distributed.CachePartitionStateTest;
+ import org.apache.ignite.internal.processors.cache.distributed.IgniteOptimisticTxSuspendResumeMultiServerTest;
+ import org.apache.ignite.internal.processors.cache.distributed.IgniteOptimisticTxSuspendResumeTest;
+ import org.apache.ignite.internal.processors.cache.distributed.IgnitePessimisticTxSuspendResumeTest;
  
  /**
   * Test suite.
@@@ -34,8 -36,10 +37,12 @@@ public class IgniteCacheTestSuite6 exte
  
          suite.addTestSuite(CachePartitionStateTest.class);
  
+         suite.addTestSuite(IgniteOptimisticTxSuspendResumeTest.class);
+         suite.addTestSuite(IgniteOptimisticTxSuspendResumeMultiServerTest.class);
+         suite.addTestSuite(IgnitePessimisticTxSuspendResumeTest.class);
+ 
 +        suite.addTestSuite(CacheExchangeMergeTest.class);
 +
          return suite;
      }
  }


Mime
View raw message