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/05/04 03:21:31 UTC
[james-project] 12/12: JAMES-3105 Expose
trustMessageDenormalization over webadmin
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 ca5389a1cb140caeeadb7f43ebafc09351e57b60
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Mon Apr 27 10:06:18 2020 +0700
JAMES-3105 Expose trustMessageDenormalization over webadmin
---
.../routes/RecomputeMailboxCountersRequestToTask.java | 4 ++--
.../routes/RecomputeMailboxCountersRequestToTaskTest.java | 2 +-
src/site/markdown/server/manage-webadmin.md | 12 +++++++++---
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/server/protocols/webadmin/webadmin-cassandra/src/main/java/org/apache/james/webadmin/routes/RecomputeMailboxCountersRequestToTask.java b/server/protocols/webadmin/webadmin-cassandra/src/main/java/org/apache/james/webadmin/routes/RecomputeMailboxCountersRequestToTask.java
index f1e230c..adf3c8f 100644
--- a/server/protocols/webadmin/webadmin-cassandra/src/main/java/org/apache/james/webadmin/routes/RecomputeMailboxCountersRequestToTask.java
+++ b/server/protocols/webadmin/webadmin-cassandra/src/main/java/org/apache/james/webadmin/routes/RecomputeMailboxCountersRequestToTask.java
@@ -36,7 +36,7 @@ import spark.Request;
public class RecomputeMailboxCountersRequestToTask extends TaskFromRequestRegistry.TaskRegistration {
private static final TaskRegistrationKey REGISTRATION_KEY = TaskRegistrationKey.of("RecomputeMailboxCounters");
- public static final String TRUST_PARAM = "trustMessageProjection";
+ private static final String TRUST_PARAM = "trustMessageProjection";
@Inject
public RecomputeMailboxCountersRequestToTask(RecomputeMailboxCountersService service) {
@@ -45,7 +45,7 @@ public class RecomputeMailboxCountersRequestToTask extends TaskFromRequestRegist
}
private static Options parseOptions(Request request) {
- var stringValue = Optional.ofNullable(request.queryParams(TRUST_PARAM));
+ Optional<String> stringValue = Optional.ofNullable(request.queryParams(TRUST_PARAM));
return parseOptions(stringValue);
}
diff --git a/server/protocols/webadmin/webadmin-cassandra/src/test/java/org/apache/james/webadmin/routes/RecomputeMailboxCountersRequestToTaskTest.java b/server/protocols/webadmin/webadmin-cassandra/src/test/java/org/apache/james/webadmin/routes/RecomputeMailboxCountersRequestToTaskTest.java
index 76691ee..c0772d9 100644
--- a/server/protocols/webadmin/webadmin-cassandra/src/test/java/org/apache/james/webadmin/routes/RecomputeMailboxCountersRequestToTaskTest.java
+++ b/server/protocols/webadmin/webadmin-cassandra/src/test/java/org/apache/james/webadmin/routes/RecomputeMailboxCountersRequestToTaskTest.java
@@ -41,7 +41,7 @@ class RecomputeMailboxCountersRequestToTaskTest {
}
@Test
- void parseOptionsShouldBeCaseIncentive() {
+ void parseOptionsShouldNotBeSensitiveToCase() {
assertThat(RecomputeMailboxCountersRequestToTask.parseOptions(Optional.of("False")))
.isEqualTo(Options.recheckMessageProjection());
}
diff --git a/src/site/markdown/server/manage-webadmin.md b/src/site/markdown/server/manage-webadmin.md
index c16e700..c480748 100644
--- a/src/site/markdown/server/manage-webadmin.md
+++ b/src/site/markdown/server/manage-webadmin.md
@@ -491,9 +491,15 @@ Rerunning the task will *eventually* provide the consistent result. As such we a
In order to ensure being offline, stop the traffic on SMTP, JMAP and IMAP ports, for example via re-configuration or
firewall rules.
-`trustMessageProjection` query parameter can be set to `true`. This will result in a better performance running the
-task at the cost of safety in the face of message denormalization inconsistencies. Defaults to false, which generates
-additional checks.
+`trustMessageProjection` query parameter can be set to `true`. Cpntent of `messageIdTable` (listing messages by their
+mailbox context) table will be trusted and not compared against content of `imapUidTable` table (listing messages by their
+messageId mailbox independent identifier). This will result in a better performance running the
+task at the cost of safety in the face of message denormalization inconsistencies.
+
+Defaults to false, which generates
+additional checks. You can read
+[this ADR](https://github.com/apache/james-project/blob/master/src/adr/0022-cassandra-message-inconsistency.md) to
+better understand the message projection and how it can become inconsistent.
#### Recomputing Global JMAP fast message view projection
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org