ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [20/50] [abbrv] ignite git commit: fixing tc
Date Mon, 05 Dec 2016 14:41:42 GMT
fixing tc


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

Branch: refs/heads/ignite-comm-balance-master
Commit: e602309254b51d7852a67237ae8000a531be0f4b
Parents: 0279404
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Sat Nov 12 16:55:50 2016 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Sat Nov 12 16:55:50 2016 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/internal/util/nio/GridNioServer.java    | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/e6023092/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
index b746488..4ae85ac 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/nio/GridNioServer.java
@@ -1379,7 +1379,7 @@ public class GridNioServer<T> {
                 ses.bytesSent(cnt);
 
                 if (!buf.hasRemaining())
-                    queue.remove(buf);
+                    queue.poll();
                 else
                     break;
             }
@@ -3124,7 +3124,10 @@ public class GridNioServer<T> {
 
                     queue.offer((ByteBuffer)msg);
 
-                    ((GridSelectorNioSessionImpl)ses).worker().registerWrite((GridSelectorNioSessionImpl)ses);
+                    GridSelectorNioSessionImpl ses0 = (GridSelectorNioSessionImpl)ses;
+
+                    if (!ses0.procWrite.get() && ses0.procWrite.compareAndSet(false,
true))
+                        ses0.worker().registerWrite(ses0);
 
                     return null;
                 }


Mime
View raw message