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-1.5 debug
Date Wed, 30 Dec 2015 09:35:38 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-1537 345656560 -> 3268a0a73


ignite-1.5 debug


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

Branch: refs/heads/ignite-1537
Commit: 3268a0a73b343b0201127017237d121c8f8166d7
Parents: 3456565
Author: sboikov <sboikov@gridgain.com>
Authored: Wed Dec 30 12:26:45 2015 +0300
Committer: sboikov <sboikov@gridgain.com>
Committed: Wed Dec 30 12:28:43 2015 +0300

----------------------------------------------------------------------
 .../near/GridNearTxFinishFuture.java            | 31 ++++++++++----------
 .../ignite/stream/socket/SocketStreamer.java    |  3 +-
 2 files changed, 17 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/3268a0a7/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
index e0c20e4..20582e9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/near/GridNearTxFinishFuture.java
@@ -717,7 +717,7 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu
 
         /**
           * @param nodeId Node ID.
-         * @return {@code True} future processed node failure.
+         * @return {@code True} if future processed node failure.
          */
         abstract boolean onNodeLeft(UUID nodeId);
 
@@ -931,36 +931,35 @@ public final class GridNearTxFinishFuture<K, V> extends GridCompoundIdentityFutu
 
         /** {@inheritDoc} */
         @Override boolean onNodeLeft(UUID nodeId) {
-            boolean done;
-
-            boolean ret;
-
-            synchronized (this) {
-                ret = nodes.remove(nodeId);
-
-                done = nodes.isEmpty();
-            }
-
-            if (done)
-                onDone(tx);
-
-            return ret;
+            return onResponse(nodeId);
         }
 
         /**
          * @param nodeId Node ID.
          */
         void onDhtFinishResponse(UUID nodeId) {
+            onResponse(nodeId);
+        }
+
+        /**
+         * @param nodeId Node ID.
+         * @return {@code True} if processed node response.
+         */
+        private boolean onResponse(UUID nodeId) {
             boolean done;
 
+            boolean ret;
+
             synchronized (this) {
-                nodes.remove(nodeId);
+                ret = nodes.remove(nodeId);
 
                 done = nodes.isEmpty();
             }
 
             if (done)
                 onDone(tx);
+
+            return ret;
         }
 
         /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/3268a0a7/modules/core/src/main/java/org/apache/ignite/stream/socket/SocketStreamer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/stream/socket/SocketStreamer.java
b/modules/core/src/main/java/org/apache/ignite/stream/socket/SocketStreamer.java
index 066a5fd..21204c7 100644
--- a/modules/core/src/main/java/org/apache/ignite/stream/socket/SocketStreamer.java
+++ b/modules/core/src/main/java/org/apache/ignite/stream/socket/SocketStreamer.java
@@ -204,7 +204,8 @@ public class SocketStreamer<T, K, V> extends StreamAdapter<T,
K, V> {
      * Stops streamer.
      */
     public void stop() {
-        srv.stop();
+        if (srv != null)
+            srv.stop();
 
         if (log.isDebugEnabled())
             log.debug("Socket streaming server stopped");


Mime
View raw message