You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2020/06/04 02:18:00 UTC
[james-project] 01/07: JAMES-2760 mailqueue.size.metricsEnabled
should be false by default
This is an automated email from the ASF dual-hosted git repository.
btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit db4c62fa41737a8a3ca2b4835be6e184c4843796
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Tue Jun 2 15:51:54 2020 +0700
JAMES-2760 mailqueue.size.metricsEnabled should be false by default
This parameter is production friendly and can avoid some incidents.
---
CHANGELOG.md | 1 +
.../destination/conf/rabbitmq.properties | 4 ++--
.../destination/conf/rabbitmq.properties | 4 ++--
.../rabbitmq/view/RabbitMQMailQueueConfiguration.java | 4 ++--
.../rabbitmq/view/RabbitMQMailQueueConfigurationTest.java | 2 +-
src/site/xdoc/server/config-rabbitmq.xml | 2 +-
upgrade-instructions.md | 14 ++++++++++++++
7 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8ce0abd..65505c2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -37,6 +37,7 @@ of tasks being currently executed.
- Linshare blob export configuration and mechanism change. See JAMES-3040.
- Differentiation between domain alias and domain mapping. Read upgrade instructions.
- JAMES-3122 Log4J2 adoption for Spring product. Log file configuration needs to be updated. See upgrade instructions.
+- JAMES-2760 mailqueue.size.metricsEnabled should be false by default
### Fixed
- JAMES-2828 & JAMES-2929 bugs affecting JDBCMailRepository usage with PostgresSQL thanks to Jörg Thomas & Sergey B
diff --git a/dockerfiles/run/guice/cassandra-rabbitmq-ldap/destination/conf/rabbitmq.properties b/dockerfiles/run/guice/cassandra-rabbitmq-ldap/destination/conf/rabbitmq.properties
index 3d34884..35e9367 100644
--- a/dockerfiles/run/guice/cassandra-rabbitmq-ldap/destination/conf/rabbitmq.properties
+++ b/dockerfiles/run/guice/cassandra-rabbitmq-ldap/destination/conf/rabbitmq.properties
@@ -38,5 +38,5 @@ mailqueue.view.updateBrowseStartPace=1000
# Metrics get exported periodically as configured in elasticsearch.properties, thus getSize is also called periodically
# Choose to disable it when the mail queue size is getting too big
# Note that this is as well a temporary workaround until we get 'getSize' method better optimized
-# Optional, default true
-mailqueue.size.metricsEnabled=true
\ No newline at end of file
+# Optional, default false
+mailqueue.size.metricsEnabled=false
\ No newline at end of file
diff --git a/dockerfiles/run/guice/cassandra-rabbitmq/destination/conf/rabbitmq.properties b/dockerfiles/run/guice/cassandra-rabbitmq/destination/conf/rabbitmq.properties
index 3d34884..35e9367 100644
--- a/dockerfiles/run/guice/cassandra-rabbitmq/destination/conf/rabbitmq.properties
+++ b/dockerfiles/run/guice/cassandra-rabbitmq/destination/conf/rabbitmq.properties
@@ -38,5 +38,5 @@ mailqueue.view.updateBrowseStartPace=1000
# Metrics get exported periodically as configured in elasticsearch.properties, thus getSize is also called periodically
# Choose to disable it when the mail queue size is getting too big
# Note that this is as well a temporary workaround until we get 'getSize' method better optimized
-# Optional, default true
-mailqueue.size.metricsEnabled=true
\ No newline at end of file
+# Optional, default false
+mailqueue.size.metricsEnabled=false
\ No newline at end of file
diff --git a/server/queue/queue-rabbitmq/src/main/java/org/apache/james/queue/rabbitmq/view/RabbitMQMailQueueConfiguration.java b/server/queue/queue-rabbitmq/src/main/java/org/apache/james/queue/rabbitmq/view/RabbitMQMailQueueConfiguration.java
index b05c0bc..0145517 100644
--- a/server/queue/queue-rabbitmq/src/main/java/org/apache/james/queue/rabbitmq/view/RabbitMQMailQueueConfiguration.java
+++ b/server/queue/queue-rabbitmq/src/main/java/org/apache/james/queue/rabbitmq/view/RabbitMQMailQueueConfiguration.java
@@ -25,7 +25,7 @@ import java.util.Optional;
import org.apache.commons.configuration2.Configuration;
public class RabbitMQMailQueueConfiguration {
- private static final boolean DEFAULT_SIZE_METRICS_ENABLED = true;
+ private static final boolean DEFAULT_SIZE_METRICS_DISABLED = false;
public static class Builder {
private Optional<Boolean> sizeMetricsEnabled;
@@ -41,7 +41,7 @@ public class RabbitMQMailQueueConfiguration {
}
public RabbitMQMailQueueConfiguration build() {
- return new RabbitMQMailQueueConfiguration(sizeMetricsEnabled.orElse(DEFAULT_SIZE_METRICS_ENABLED));
+ return new RabbitMQMailQueueConfiguration(sizeMetricsEnabled.orElse(DEFAULT_SIZE_METRICS_DISABLED));
}
}
diff --git a/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/view/RabbitMQMailQueueConfigurationTest.java b/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/view/RabbitMQMailQueueConfigurationTest.java
index fefaff8..e442fac 100644
--- a/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/view/RabbitMQMailQueueConfigurationTest.java
+++ b/server/queue/queue-rabbitmq/src/test/java/org/apache/james/queue/rabbitmq/view/RabbitMQMailQueueConfigurationTest.java
@@ -37,7 +37,7 @@ class RabbitMQMailQueueConfigurationTest {
RabbitMQMailQueueConfiguration actual = RabbitMQMailQueueConfiguration.from(new PropertiesConfiguration());
assertThat(actual)
- .isEqualTo(RabbitMQMailQueueConfiguration.sizeMetricsEnabled());
+ .isEqualTo(RabbitMQMailQueueConfiguration.sizeMetricsDisabled());
}
@Test
diff --git a/src/site/xdoc/server/config-rabbitmq.xml b/src/site/xdoc/server/config-rabbitmq.xml
index 9a375da..90ef6ff 100644
--- a/src/site/xdoc/server/config-rabbitmq.xml
+++ b/src/site/xdoc/server/config-rabbitmq.xml
@@ -97,7 +97,7 @@
<dt><strong>mailqueue.size.metricsEnabled</strong></dt>
<dd>
- By default, the metrics are enabled for the mail queue size.
+ By default, the metrics are disabled for the mail queue size.
As computing the size of the mail queue is currently implemented on top of browse operation and thus have a linear complexity,
sometimes it can get too big, making it impossible for the ES reporter to handle it correctly without crashing.
It can be useful then to disable it.
diff --git a/upgrade-instructions.md b/upgrade-instructions.md
index 2065028..a1171f4 100644
--- a/upgrade-instructions.md
+++ b/upgrade-instructions.md
@@ -34,6 +34,18 @@ Change list:
- [Tune Cassandra time serie tables options](#tune-cassandra-time-serie-tables-options)
- [Log4J2 Adoption](#log4j2-adoption)
- [Drop Cassandra schema version prior version 5](#drop-cassandra-schema-version-prior-version-5)
+ - [mailqueue.size.metricsEnabled now defaults to false](#mailqueuesizemetricsenabled-now-defaults-to-false)
+
+### mailqueue.size.metricsEnabled now defaults to false
+
+Date 03/06/2020
+
+JIRA: https://issues.apache.org/jira/browse/JAMES-2760
+
+Concerned product: Distributed James
+
+`mailqueue.size.metricsEnabled` is now false by default. If you previously used it, please be aware that it can have
+some important performance penalty, and set it explicitly to `true` if you still need it.
### Drop Cassandra schema version prior version 5
@@ -41,6 +53,8 @@ Date 06/04/2020
JIRA: https://issues.apache.org/jira/browse/JAMES-2997
+Concerned product: Distributed James, Cassandra-guice James server
+
In an effort to simplify the code base, we dropped support for Cassandra schema version prior version 5.
Installation running older schema version than version 5 needs to rely on release 3.5.0 to upgrade to schema version 7,
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org