Return-Path: X-Original-To: apmail-ignite-commits-archive@minotaur.apache.org Delivered-To: apmail-ignite-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C8D1718247 for ; Mon, 22 Jun 2015 13:19:22 +0000 (UTC) Received: (qmail 6920 invoked by uid 500); 22 Jun 2015 13:19:22 -0000 Delivered-To: apmail-ignite-commits-archive@ignite.apache.org Received: (qmail 6891 invoked by uid 500); 22 Jun 2015 13:19:22 -0000 Mailing-List: contact commits-help@ignite.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.incubator.apache.org Delivered-To: mailing list commits@ignite.incubator.apache.org Received: (qmail 6882 invoked by uid 99); 22 Jun 2015 13:19:22 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jun 2015 13:19:22 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 41240183BEE for ; Mon, 22 Jun 2015 13:19:22 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.771 X-Spam-Level: * X-Spam-Status: No, score=1.771 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id naS2lFn-HVCl for ; Mon, 22 Jun 2015 13:19:15 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with SMTP id 66A9E2D777 for ; Mon, 22 Jun 2015 13:19:09 +0000 (UTC) Received: (qmail 5555 invoked by uid 99); 22 Jun 2015 13:19:05 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jun 2015 13:19:05 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CFBE8E3609; Mon, 22 Jun 2015 13:19:05 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vozerov@apache.org To: commits@ignite.incubator.apache.org Date: Mon, 22 Jun 2015 13:19:26 -0000 Message-Id: <9214db9ede134846bb55049f9dcd2c77@git.apache.org> In-Reply-To: <6228b13ee16747998565a9a3ec6b69c8@git.apache.org> References: <6228b13ee16747998565a9a3ec6b69c8@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [22/27] incubator-ignite git commit: # review droppng of slow clients # 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-gg-9795 Commit: 7c70267d2b4b7fc3fb7a1efda1ee785cebebcc41 Parents: 1cc0000 Author: Yakov Zhdanov Authored: Mon Jun 22 12:49:58 2015 +0300 Committer: Yakov Zhdanov 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 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. *

- * 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. *

* 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. - *

- * 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();