ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [22/49] incubator-ignite git commit: # review droppng of slow clients
Date Wed, 24 Jun 2015 22:50:09 GMT
# review droppng of slow clients


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

Branch: refs/heads/ignite-1026
Commit: 7c70267d2b4b7fc3fb7a1efda1ee785cebebcc41
Parents: 1cc0000
Author: Yakov Zhdanov <yzhdanov@gridgain.com>
Authored: Mon Jun 22 12:49:58 2015 +0300
Committer: Yakov Zhdanov <yzhdanov@gridgain.com>
Committed: Mon Jun 22 12:49:58 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/IgniteSystemProperties.java   |  3 ++
 .../communication/tcp/TcpCommunicationSpi.java  | 49 ++++++++++----------
 .../tcp/TcpCommunicationSpiMBean.java           |  8 ++++
 3 files changed, 36 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c70267d/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
index b166f39..542fa30 100644
--- a/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
+++ b/modules/core/src/main/java/org/apache/ignite/IgniteSystemProperties.java
@@ -236,7 +236,10 @@ public final class IgniteSystemProperties {
     /**
      * System property to disable buffered communication if node sends less messages count
than
      * specified by this property. Default value is {@code 512}.
+     *
+     * @deprecated Not used anymore.
      */
+    @Deprecated
     public static final String IGNITE_MIN_BUFFERED_COMMUNICATION_MSG_CNT = "IGNITE_MIN_BUFFERED_COMMUNICATION_MSG_CNT";
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c70267d/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
index 1ec2128..1035ee5 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpi.java
@@ -29,7 +29,6 @@ import org.apache.ignite.internal.util.ipc.*;
 import org.apache.ignite.internal.util.ipc.shmem.*;
 import org.apache.ignite.internal.util.lang.*;
 import org.apache.ignite.internal.util.nio.*;
-import org.apache.ignite.internal.util.tostring.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.apache.ignite.internal.util.typedef.internal.*;
 import org.apache.ignite.internal.util.worker.*;
@@ -51,7 +50,6 @@ import java.util.*;
 import java.util.concurrent.*;
 import java.util.concurrent.atomic.*;
 
-import static org.apache.ignite.IgniteSystemProperties.*;
 import static org.apache.ignite.events.EventType.*;
 
 /**
@@ -657,9 +655,6 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
     /** Slow client queue limit. */
     private int slowClientQueueLimit;
 
-    /** Min buffered message count. */
-    private int minBufferedMsgCnt = Integer.getInteger(IGNITE_MIN_BUFFERED_COMMUNICATION_MSG_CNT,
512);
-
     /** NIO server. */
     private GridNioServer<Message> nioSrvr;
 
@@ -935,24 +930,29 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
      *
      * @param connBufSize Connection buffer size.
      * @see #setConnectionBufferFlushFrequency(long)
+     * @deprecated Not used any more.
      */
+    @Deprecated
     @IgniteSpiConfiguration(optional = true)
     public void setConnectionBufferSize(int connBufSize) {
         // No-op.
     }
 
     /** {@inheritDoc} */
+    @Deprecated
     @Override public int getConnectionBufferSize() {
         return 0;
     }
 
     /** {@inheritDoc} */
+    @Deprecated
     @IgniteSpiConfiguration(optional = true)
     @Override public void setConnectionBufferFlushFrequency(long connBufFlushFreq) {
         // No-op.
     }
 
     /** {@inheritDoc} */
+    @Deprecated
     @Override public long getConnectionBufferFlushFrequency() {
         return 0;
     }
@@ -1156,13 +1156,14 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
     /**
      * Sets slow client queue limit.
      * <p/>
-     * When set to a positive number, communication SPI will monitor clients outbound queue
sizes and will drop
+     * When set to a positive number, communication SPI will monitor clients outbound message
queue sizes and will drop
      * those clients whose queue exceeded this limit.
      * <p/>
      * Usually this value should be set to the same value as {@link #getMessageQueueLimit()}
which controls
-     * message back-pressure for server nodes. The default value for this parameter is {@link
#DFLT_MSG_QUEUE_LIMIT}.
+     * message back-pressure for server nodes. The default value for this parameter is {@code
0}
+     * which means {@code unlimited}.
      *
-     * @param slowClientQueueLimit Slow cilent queue limit.
+     * @param slowClientQueueLimit Slow client queue limit.
      */
     public void setSlowClientQueueLimit(int slowClientQueueLimit) {
         this.slowClientQueueLimit = slowClientQueueLimit;
@@ -1171,20 +1172,20 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
     /**
      * Sets the minimum number of messages for this SPI, that are buffered
      * prior to sending.
-     * <p>
-     * Defaults to either {@code 512} or {@link IgniteSystemProperties#IGNITE_MIN_BUFFERED_COMMUNICATION_MSG_CNT}
-     * system property (if specified).
      *
      * @param minBufferedMsgCnt Minimum buffered message count.
+     * @deprecated Not used any more.
      */
     @IgniteSpiConfiguration(optional = true)
+    @Deprecated
     public void setMinimumBufferedMessageCount(int minBufferedMsgCnt) {
-        this.minBufferedMsgCnt = minBufferedMsgCnt;
+        // No-op.
     }
 
     /** {@inheritDoc} */
+    @Deprecated
     @Override public int getMinimumBufferedMessageCount() {
-        return minBufferedMsgCnt;
+        return 0;
     }
 
     /** {@inheritDoc} */
@@ -1248,7 +1249,6 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
         assertParameter(shmemPort > 0 || shmemPort == -1, "shmemPort > 0 || shmemPort
== -1");
         assertParameter(reconCnt > 0, "reconnectCnt > 0");
         assertParameter(selectorsCnt > 0, "selectorsCnt > 0");
-        assertParameter(minBufferedMsgCnt >= 0, "minBufferedMsgCnt >= 0");
         assertParameter(connTimeout >= 0, "connTimeout >= 0");
         assertParameter(maxConnTimeout >= connTimeout, "maxConnTimeout >= connTimeout");
         assertParameter(sockWriteTimeout >= 0, "sockWriteTimeout >= 0");
@@ -1326,7 +1326,6 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
             log.debug(configInfo("sockRcvBuf", sockRcvBuf));
             log.debug(configInfo("shmemPort", shmemPort));
             log.debug(configInfo("msgQueueLimit", msgQueueLimit));
-            log.debug(configInfo("minBufferedMsgCnt", minBufferedMsgCnt));
             log.debug(configInfo("connTimeout", connTimeout));
             log.debug(configInfo("maxConnTimeout", maxConnTimeout));
             log.debug(configInfo("reconCnt", reconCnt));
@@ -1339,11 +1338,10 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
             U.quietAndWarn(log, "'TCP_NO_DELAY' for communication is off, which should be
used with caution " +
                 "since may produce significant delays with some scenarios.");
 
-        if (slowClientQueueLimit > 0 && msgQueueLimit > 0) {
-            if (slowClientQueueLimit >= msgQueueLimit) {
-                U.quietAndWarn(log, "Slow client queue limit is set to a value greater than
message queue limit. " +
-                    "Slow client queue limit will have no effect.");
-            }
+        if (slowClientQueueLimit > 0 && msgQueueLimit > 0 && slowClientQueueLimit
>= msgQueueLimit) {
+            U.quietAndWarn(log, "Slow client queue limit is set to a value greater than message
queue limit " +
+                "(slow client queue limit will have no effect) [msgQueueLimit=" + msgQueueLimit
+
+                    ", slowClientQueueLimit=" + slowClientQueueLimit + ']');
         }
 
         registerMBean(gridName, this, TcpCommunicationSpiMBean.class);
@@ -1916,13 +1914,16 @@ public class TcpCommunicationSpi extends IgniteSpiAdapter
                 ClusterNode node = getSpiContext().node(id);
 
                 if (node != null && node.isClient()) {
-                    String msg = "Client node outbound queue size exceeded slowClientQueueLimit,
" +
-                        "the client will be dropped (consider changing \'slowClientQueueLimit\')
[" +
-                        "srvNode=" + getSpiContext().localNode().id() +
+                    String msg = "Client node outbound message queue size exceeded slowClientQueueLimit,
" +
+                        "the client will be dropped " +
+                        "(consider changing 'slowClientQueueLimit' configuration property)
" +
+                        "[srvNode=" + getSpiContext().localNode().id() +
                         ", clientNode=" + node +
                         ", slowClientQueueLimit=" + slowClientQueueLimit + ']';
 
-                    LT.warn(log, null, msg);
+                    U.quietAndWarn(
+                        log,
+                        msg);
 
                     getSpiContext().failNode(id, msg);
                 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/7c70267d/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMBean.java
b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMBean.java
index 1971d99..067ca41 100644
--- a/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMBean.java
+++ b/modules/core/src/main/java/org/apache/ignite/spi/communication/tcp/TcpCommunicationSpiMBean.java
@@ -168,7 +168,9 @@ public interface TcpCommunicationSpiMBean extends IgniteSpiManagementMBean
{
      * connection buffer.
      *
      * @return Flush frequency.
+     * @deprecated Not used anymore.
      */
+    @Deprecated
     @MXBeanDescription("Connection buffer flush frequency.")
     public long getConnectionBufferFlushFrequency();
 
@@ -183,7 +185,9 @@ public interface TcpCommunicationSpiMBean extends IgniteSpiManagementMBean
{
      *
      * @param connBufFlushFreq Flush frequency.
      * @see #getConnectionBufferSize()
+     * @deprecated Not used anymore.
      */
+    @Deprecated
     @MXBeanDescription("Sets connection buffer flush frequency.")
     public void setConnectionBufferFlushFrequency(long connBufFlushFreq);
 
@@ -193,7 +197,9 @@ public interface TcpCommunicationSpiMBean extends IgniteSpiManagementMBean
{
      * If set to {@code 0} connection buffer is disabled.
      *
      * @return Connection buffer size.
+     * @deprecated Not used anymore.
      */
+    @Deprecated
     @MXBeanDescription("Connection buffer size.")
     public int getConnectionBufferSize();
 
@@ -238,7 +244,9 @@ public interface TcpCommunicationSpiMBean extends IgniteSpiManagementMBean
{
      * prior to sending.
      *
      * @return Minimum buffered message count.
+     * @deprecated Not used anymore.
      */
+    @Deprecated
     @MXBeanDescription("Minimum buffered message count.")
     public int getMinimumBufferedMessageCount();
 


Mime
View raw message