ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [09/27] ignite git commit: Merge remote-tracking branch 'remotes/upstream/ignite-1.6.8' into ignite-1.7.2
Date Fri, 23 Sep 2016 16:05:43 GMT
Merge remote-tracking branch 'remotes/upstream/ignite-1.6.8' into ignite-1.7.2

# Conflicts:
#	modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java


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

Branch: refs/heads/ignite-comm-balance
Commit: 83ff7c7df8e659c9b0f267a55f6a04223145d69f
Parents: a3e98da 9b72d18
Author: Anton Vinogradov <av@apache.org>
Authored: Mon Sep 19 18:37:34 2016 +0300
Committer: Anton Vinogradov <av@apache.org>
Committed: Mon Sep 19 18:37:34 2016 +0300

----------------------------------------------------------------------
 .../apache/ignite/IgniteSystemProperties.java   |  12 +
 .../internal/GridEventConsumeHandler.java       |   5 -
 .../internal/GridMessageListenHandler.java      |   5 -
 .../internal/binary/BinaryObjectExImpl.java     | 161 ++++++---
 .../communication/GridIoMessageFactory.java     |   6 +
 .../processors/cache/GridCacheEntryEx.java      |   8 +
 .../processors/cache/GridCacheMapEntry.java     |   9 +-
 .../GridCacheReturnCompletableWrapper.java      | 101 ++++++
 .../cache/GridDeferredAckMessageSender.java     | 219 ++++++++++++
 .../GridDistributedTxRemoteAdapter.java         |  65 +++-
 .../distributed/dht/GridDhtTxFinishFuture.java  |  12 +-
 .../distributed/dht/GridDhtTxFinishRequest.java |  33 +-
 .../dht/GridDhtTxFinishResponse.java            |  52 ++-
 .../dht/GridDhtTxOnePhaseCommitAckRequest.java  | 134 +++++++
 .../distributed/dht/GridDhtTxPrepareFuture.java |  42 ++-
 .../dht/GridDhtTxPrepareRequest.java            |  93 +++--
 .../cache/distributed/dht/GridDhtTxRemote.java  |   6 +-
 .../dht/atomic/GridDhtAtomicCache.java          | 227 +++---------
 ...arOptimisticSerializableTxPrepareFuture.java |   4 +-
 .../near/GridNearOptimisticTxPrepareFuture.java |   7 +-
 .../GridNearPessimisticTxPrepareFuture.java     |   4 +-
 .../near/GridNearTxFinishFuture.java            | 112 +++++-
 .../continuous/CacheContinuousQueryHandler.java |   5 -
 .../cache/transactions/IgniteTxAdapter.java     |  46 ++-
 .../cache/transactions/IgniteTxEntry.java       |  44 ++-
 .../cache/transactions/IgniteTxHandler.java     | 163 +++++++--
 .../transactions/IgniteTxLocalAdapter.java      |  27 +-
 .../cache/transactions/IgniteTxManager.java     | 154 +++++++-
 .../continuous/GridContinuousHandler.java       |   8 -
 .../continuous/GridContinuousProcessor.java     |  33 +-
 .../binary/BinaryObjectToStringSelfTest.java    |  75 ++++
 ...idAbstractCacheInterceptorRebalanceTest.java | 356 +++++++++++++++++++
 ...heInterceptorAtomicOffheapRebalanceTest.java |  30 ++
 ...GridCacheInterceptorAtomicRebalanceTest.java |  36 ++
 ...ceptorTransactionalOffheapRebalanceTest.java |  35 ++
 ...heInterceptorTransactionalRebalanceTest.java |  36 ++
 .../processors/cache/GridCacheTestEntryEx.java  |   4 +
 .../IgniteCacheInterceptorSelfTestSuite.java    |   5 +
 .../IgniteCachePutRetryAbstractSelfTest.java    |  39 +-
 ...gniteCachePutRetryTransactionalSelfTest.java |  75 +++-
 ...ContinuousQueryFailoverAbstractSelfTest.java |  99 ++++++
 ...eContinuousQueryMultiNodesFilteringTest.java | 161 +++++++++
 .../IgniteBinaryObjectsTestSuite.java           |   2 +
 .../config/benchmark-client-mode.properties     |   2 +
 .../config/benchmark-tx-win.properties          |   2 +
 .../yardstick/config/benchmark-tx.properties    |   2 +
 .../yardstick/config/benchmark-win.properties   |   2 +
 modules/yardstick/config/benchmark.properties   |   2 +
 .../cache/IgniteGetAndPutBenchmark.java         |  41 +++
 .../cache/IgniteGetAndPutTxBenchmark.java       |  70 ++++
 .../cache/IgniteInvokeTxBenchmark.java          |  40 +++
 51 files changed, 2471 insertions(+), 440 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/83ff7c7d/modules/core/src/main/java/org/apache/ignite/internal/managers/communication/GridIoMessageFactory.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ignite/blob/83ff7c7d/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
----------------------------------------------------------------------
diff --cc modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
index 620d9ae,a5b2202..fbd8ce5
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxHandler.java
@@@ -990,41 -959,44 +999,47 @@@ public class IgniteTxHandler 
                  req.deployInfo() != null);
          }
  
-         try {
-             // Reply back to sender.
-             ctx.io().send(nodeId, res, req.policy());
+         if (req.onePhaseCommit()) {
+             IgniteInternalFuture completeFut;
  
-             if (txPrepareMsgLog.isDebugEnabled()) {
-                 txPrepareMsgLog.debug("Sent dht prepare response [txId=" + req.nearXidVersion()
+
-                     ", dhtTxId=" + req.version() +
-                     ", node=" + nodeId + ']');
-             }
-         }
-         catch (IgniteCheckedException e) {
-             if (e instanceof ClusterTopologyCheckedException) {
-                 if (txPrepareMsgLog.isDebugEnabled()) {
-                     txPrepareMsgLog.debug("Failed to send dht prepare response, node left
[txId=" + req.nearXidVersion() +
-                         ", dhtTxId=" + req.version() +
-                         ", node=" + nodeId + ']');
-                 }
-             }
-             else {
-                 U.warn(log, "Failed to send tx response to remote node (will rollback transaction)
[" +
-                     "txId=" + req.nearXidVersion() +
-                     ", dhtTxId=" + req.version() +
-                     ", node=" + nodeId +
-                     ", err=" + e.getMessage() + ']');
+             IgniteInternalFuture<IgniteInternalTx> dhtFin = dhtTx == null ?
+                 null : dhtTx.done() ? null : dhtTx.finishFuture();
+ 
+             final IgniteInternalFuture<IgniteInternalTx> nearFin = nearTx == null
?
+                 null : nearTx.done() ? null : nearTx.finishFuture();
+ 
+             if (dhtFin != null && nearFin != null) {
+                 GridCompoundFuture fut = new GridCompoundFuture();
+ 
+                 fut.add(dhtFin);
+                 fut.add(nearFin);
+ 
+                 fut.markInitialized();
+ 
+                 completeFut = fut;
              }
+             else
+                 completeFut = dhtFin != null ? dhtFin : nearFin;
  
-             if (nearTx != null)
-                 nearTx.rollback();
+             if (completeFut != null) {
+                 final GridDhtTxPrepareResponse res0 = res;
+                 final GridDhtTxRemote dhtTx0 = dhtTx;
+                 final GridNearTxRemote nearTx0 = nearTx;
  
-             if (dhtTx != null)
-                 dhtTx.rollback();
+                 completeFut.listen(new CI1<IgniteInternalFuture<IgniteInternalTx>>()
{
+                     @Override public void apply(IgniteInternalFuture<IgniteInternalTx>
fut) {
+                         sendReply(nodeId, req, res0, dhtTx0, nearTx0);
+                     }
+                 });
+             }
+             else
+                 sendReply(nodeId, req, res, dhtTx, nearTx);
          }
+         else
+             sendReply(nodeId, req, res, dhtTx, nearTx);
 +
 +        assert req.txState() != null || res.error() != null ||
 +            (ctx.tm().tx(req.version()) == null && ctx.tm().nearTx(req.version())
== null);
      }
  
      /**


Mime
View raw message