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 ad...@apache.org on 2017/12/15 15:46:43 UTC

[1/3] james-project git commit: MAILBOX-322 Add a Cassandra mailbox listener logger

Repository: james-project
Updated Branches:
  refs/heads/master af726bbb9 -> eeca3b563


MAILBOX-322 Add a Cassandra mailbox listener logger

This will help diagnose Ghost mailbox bug. Note the possibility to filter per mailbox and per event type.


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

Branch: refs/heads/master
Commit: dd2ef3aa3f778e70bc60d8c69edca36e24c40dfd
Parents: 73e9333
Author: benwa <bt...@linagora.com>
Authored: Thu Dec 14 10:32:13 2017 +0700
Committer: Antoine Duprat <ad...@linagora.com>
Committed: Fri Dec 15 16:45:42 2017 +0100

----------------------------------------------------------------------
 .../james/mailbox/cassandra/GhostMailbox.java   | 42 ++++++++++++
 .../MailboxOperationLoggingListener.java        | 72 ++++++++++++++++++++
 .../modules/mailbox/CassandraMailboxModule.java |  5 ++
 3 files changed, 119 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/dd2ef3aa/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/GhostMailbox.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/GhostMailbox.java b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/GhostMailbox.java
new file mode 100644
index 0000000..b3bd17b
--- /dev/null
+++ b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/GhostMailbox.java
@@ -0,0 +1,42 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.mailbox.cassandra;
+
+import org.apache.james.util.MDCStructuredLogger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * See https://issues.apache.org/jira/browse/MAILBOX-322 for reading about the Ghost mailbox bug.
+ *
+ * This class intend to introduce a dedicated logger for the ghost mailbox bug.
+ */
+public class GhostMailbox {
+    private static  final Logger LOGGER = LoggerFactory.getLogger(GhostMailbox.class);
+
+    public static String MAILBOX_NAME = "mailboxName";
+    public static String TYPE = "type";
+    public static String MAILBOX_ID = "mailboxId";
+
+    public static MDCStructuredLogger logger() {
+        return MDCStructuredLogger.forLogger(LOGGER);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/dd2ef3aa/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/MailboxOperationLoggingListener.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/MailboxOperationLoggingListener.java b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/MailboxOperationLoggingListener.java
new file mode 100644
index 0000000..f0b7226
--- /dev/null
+++ b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/MailboxOperationLoggingListener.java
@@ -0,0 +1,72 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.mailbox.cassandra;
+
+import static org.apache.james.mailbox.cassandra.GhostMailbox.MAILBOX_NAME;
+import static org.apache.james.mailbox.cassandra.GhostMailbox.TYPE;
+
+import org.apache.james.mailbox.MailboxListener;
+
+/**
+ * See https://issues.apache.org/jira/browse/MAILBOX-322 for reading about the Ghost mailbox bug.
+ *
+ * This class logs mailboxes writes in order to give context to analyse ghost mailbox bug.
+ */
+public class MailboxOperationLoggingListener implements MailboxListener {
+    public static final String ADDED = "Added";
+    public static final String REMOVED = "Removed";
+
+    @Override
+    public ListenerType getType() {
+        return ListenerType.ONCE;
+    }
+
+    @Override
+    public ExecutionMode getExecutionMode() {
+        return ExecutionMode.SYNCHRONOUS;
+    }
+
+    @Override
+    public void event(Event event) {
+        if (event instanceof MailboxRenamed) {
+            MailboxRenamed mailboxRenamed = (MailboxRenamed) event;
+            GhostMailbox.logger()
+                .addField(MAILBOX_NAME, mailboxRenamed.getNewPath())
+                .addField(TYPE, ADDED)
+                .log(logger -> logger.info("Mailbox renamed event"));
+            GhostMailbox.logger()
+                .addField(MAILBOX_NAME, mailboxRenamed.getMailboxPath())
+                .addField(TYPE, REMOVED)
+                .log(logger -> logger.info("Mailbox renamed event"));
+        }
+        if (event instanceof MailboxDeletion) {
+            GhostMailbox.logger()
+                .addField(MAILBOX_NAME, event.getMailboxPath())
+                .addField(TYPE, REMOVED)
+                .log(logger -> logger.info("Mailbox deleted event"));
+        }
+        if (event instanceof MailboxAdded) {
+            GhostMailbox.logger()
+                .addField(MAILBOX_NAME, event.getMailboxPath())
+                .addField(TYPE, ADDED)
+                .log(logger -> logger.info("Mailbox added event"));
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/james-project/blob/dd2ef3aa/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/mailbox/CassandraMailboxModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/mailbox/CassandraMailboxModule.java b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/mailbox/CassandraMailboxModule.java
index 35e524c..18789c6 100644
--- a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/mailbox/CassandraMailboxModule.java
+++ b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/mailbox/CassandraMailboxModule.java
@@ -25,6 +25,7 @@ import org.apache.james.adapter.mailbox.store.UserRepositoryAuthorizator;
 import org.apache.james.backends.cassandra.components.CassandraModule;
 import org.apache.james.mailbox.AttachmentManager;
 import org.apache.james.mailbox.BlobManager;
+import org.apache.james.mailbox.MailboxListener;
 import org.apache.james.mailbox.MailboxManager;
 import org.apache.james.mailbox.MailboxPathLocker;
 import org.apache.james.mailbox.MessageIdManager;
@@ -33,6 +34,7 @@ import org.apache.james.mailbox.SubscriptionManager;
 import org.apache.james.mailbox.cassandra.CassandraMailboxManager;
 import org.apache.james.mailbox.cassandra.CassandraMailboxSessionMapperFactory;
 import org.apache.james.mailbox.cassandra.CassandraSubscriptionManager;
+import org.apache.james.mailbox.cassandra.MailboxOperationLoggingListener;
 import org.apache.james.mailbox.cassandra.ids.CassandraId;
 import org.apache.james.mailbox.cassandra.ids.CassandraMessageId;
 import org.apache.james.mailbox.cassandra.mail.CassandraACLMapper;
@@ -130,6 +132,9 @@ public class CassandraMailboxModule extends AbstractModule {
         bind(AttachmentManager.class).to(StoreAttachmentManager.class);
         bind(RightManager.class).to(StoreRightManager.class);
 
+        Multibinder<MailboxListener> mailboxListeners = Multibinder.newSetBinder(binder(), MailboxListener.class);
+        mailboxListeners.addBinding().to(MailboxOperationLoggingListener.class);
+
         Multibinder<CassandraModule> cassandraDataDefinitions = Multibinder.newSetBinder(binder(), CassandraModule.class);
         cassandraDataDefinitions.addBinding().to(org.apache.james.mailbox.cassandra.modules.CassandraAclModule.class);
         cassandraDataDefinitions.addBinding().to(org.apache.james.mailbox.cassandra.modules.CassandraMailboxCounterModule.class);


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[2/3] james-project git commit: MAILBOX-322 Generify Guice MailboxListener registration

Posted by ad...@apache.org.
MAILBOX-322 Generify Guice MailboxListener registration


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/73e93336
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/73e93336
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/73e93336

Branch: refs/heads/master
Commit: 73e933361068c553e3f17eb0a7d3332b4b2d349c
Parents: af726bb
Author: benwa <bt...@linagora.com>
Authored: Thu Dec 14 10:04:45 2017 +0700
Committer: Antoine Duprat <ad...@linagora.com>
Committed: Fri Dec 15 16:45:42 2017 +0100

----------------------------------------------------------------------
 .../modules/mailbox/DefaultEventModule.java     | 49 ++++++++++++++++++++
 .../java/org/apache/james/jmap/JMAPModule.java  | 32 ++-----------
 2 files changed, 52 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/73e93336/server/container/guice/mailbox/src/main/java/org/apache/james/modules/mailbox/DefaultEventModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/mailbox/src/main/java/org/apache/james/modules/mailbox/DefaultEventModule.java b/server/container/guice/mailbox/src/main/java/org/apache/james/modules/mailbox/DefaultEventModule.java
index 9bb03f8..3e7f303 100644
--- a/server/container/guice/mailbox/src/main/java/org/apache/james/modules/mailbox/DefaultEventModule.java
+++ b/server/container/guice/mailbox/src/main/java/org/apache/james/modules/mailbox/DefaultEventModule.java
@@ -19,13 +19,30 @@
 
 package org.apache.james.modules.mailbox;
 
+import java.util.List;
+import java.util.Set;
+
+import org.apache.james.lifecycle.api.Configurable;
+import org.apache.james.mailbox.MailboxListener;
+import org.apache.james.mailbox.MailboxManager;
+import org.apache.james.mailbox.MailboxSession;
+import org.apache.james.mailbox.exception.MailboxException;
 import org.apache.james.mailbox.store.event.DefaultDelegatingMailboxListener;
 import org.apache.james.mailbox.store.event.DelegatingMailboxListener;
 import org.apache.james.mailbox.store.event.EventDelivery;
 import org.apache.james.mailbox.store.event.SynchronousEventDelivery;
+import org.apache.james.modules.Names;
+import org.apache.james.utils.ConfigurationPerformer;
 
+import com.github.fge.lambdas.Throwing;
+import com.google.common.base.Throwables;
+import com.google.common.collect.ImmutableList;
 import com.google.inject.AbstractModule;
+import com.google.inject.Inject;
 import com.google.inject.Scopes;
+import com.google.inject.Singleton;
+import com.google.inject.multibindings.Multibinder;
+import com.google.inject.name.Named;
 
 public class DefaultEventModule extends AbstractModule {
 
@@ -36,5 +53,37 @@ public class DefaultEventModule extends AbstractModule {
 
         bind(SynchronousEventDelivery.class).in(Scopes.SINGLETON);
         bind(EventDelivery.class).to(SynchronousEventDelivery.class);
+
+        Multibinder.newSetBinder(binder(), ConfigurationPerformer.class).addBinding().to(ListenerRegistrationPerformer.class);
+        Multibinder.newSetBinder(binder(), MailboxListener.class);
+    }
+
+    @Singleton
+    public static class ListenerRegistrationPerformer implements ConfigurationPerformer {
+        private final MailboxManager mailboxManager;
+        private final Set<MailboxListener> listeners;
+
+        @Inject
+        public ListenerRegistrationPerformer(@Named(Names.MAILBOXMANAGER_NAME) MailboxManager mailboxManager,
+                                             Set<MailboxListener> listeners) {
+            this.mailboxManager = mailboxManager;
+            this.listeners = listeners;
+        }
+
+        @Override
+        public void initModule() {
+            try {
+                MailboxSession systemSession = mailboxManager.createSystemSession("storeMailboxManager");
+                listeners.forEach(Throwing.consumer(listener ->
+                    mailboxManager.addGlobalListener(listener, systemSession)));
+            } catch (MailboxException e) {
+                Throwables.propagate(e);
+            }
+        }
+
+        @Override
+        public List<Class<? extends Configurable>> forClasses() {
+            return ImmutableList.of();
+        }
     }
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/73e93336/server/container/guice/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPModule.java
----------------------------------------------------------------------
diff --git a/server/container/guice/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPModule.java b/server/container/guice/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPModule.java
index 42a3d07..29adf98 100644
--- a/server/container/guice/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPModule.java
+++ b/server/container/guice/protocols/jmap/src/main/java/org/apache/james/jmap/JMAPModule.java
@@ -38,9 +38,9 @@ import org.apache.james.jmap.utils.SystemMailboxesProvider;
 import org.apache.james.jmap.utils.SystemMailboxesProviderImpl;
 import org.apache.james.jwt.JwtConfiguration;
 import org.apache.james.lifecycle.api.Configurable;
+import org.apache.james.mailbox.MailboxListener;
 import org.apache.james.mailbox.MailboxManager;
 import org.apache.james.mailbox.MailboxManager.SearchCapabilities;
-import org.apache.james.mailbox.exception.MailboxException;
 import org.apache.james.mailetcontainer.impl.MatcherMailetPair;
 import org.apache.james.modules.server.CamelMailetContainerModule;
 import org.apache.james.queue.api.MailQueueItemDecoratorFactory;
@@ -91,13 +91,14 @@ public class JMAPModule extends AbstractModule {
 
         bind(HtmlTextExtractor.class).to(JsoupHtmlTextExtractor.class);
         Multibinder.newSetBinder(binder(), ConfigurationPerformer.class).addBinding().to(RequiredCapabilitiesPrecondition.class);
-        Multibinder.newSetBinder(binder(), ConfigurationPerformer.class).addBinding().to(JmapListenerRegistrationPerformer.class);
 
         Multibinder<CamelMailetContainerModule.TransportProcessorCheck> transportProcessorChecks = Multibinder.newSetBinder(binder(), CamelMailetContainerModule.TransportProcessorCheck.class);
         transportProcessorChecks.addBinding().to(VacationMailetCheck.class);
         
         bind(SystemMailboxesProvider.class).to(SystemMailboxesProviderImpl.class);
         bind(MailQueueItemDecoratorFactory.class).to(PostDequeueDecoratorFactory.class).in(Scopes.SINGLETON);
+
+        Multibinder.newSetBinder(binder(), MailboxListener.class).addBinding().to(PropagateLookupRightListener.class);
     }
 
     @Provides
@@ -131,33 +132,6 @@ public class JMAPModule extends AbstractModule {
     }
 
     @Singleton
-    public static class JmapListenerRegistrationPerformer implements ConfigurationPerformer {
-        private final MailboxManager mailboxManager;
-        private final PropagateLookupRightListener propagateLookupRightListener;
-
-        @Inject
-        public JmapListenerRegistrationPerformer(MailboxManager mailboxManager, PropagateLookupRightListener propagateLookupRightListener) {
-            this.mailboxManager = mailboxManager;
-            this.propagateLookupRightListener = propagateLookupRightListener;
-        }
-
-        @Override
-        public void initModule() {
-            try {
-                mailboxManager.addGlobalListener(propagateLookupRightListener,
-                                                 mailboxManager.createSystemSession("storeMailboxManager"));
-            } catch (MailboxException e) {
-                Throwables.propagate(e);
-            }
-        }
-
-        @Override
-        public List<Class<? extends Configurable>> forClasses() {
-            return ImmutableList.of();
-        }
-    }
-
-    @Singleton
     public static class RequiredCapabilitiesPrecondition implements ConfigurationPerformer {
 
         private final MailboxManager mailboxManager;


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


[3/3] james-project git commit: MAILBOX-322 Add logging upon mailbox read

Posted by ad...@apache.org.
MAILBOX-322 Add logging upon mailbox read


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

Branch: refs/heads/master
Commit: eeca3b563e32136bcffd05cab67bfcd1b32d17f2
Parents: dd2ef3a
Author: benwa <bt...@linagora.com>
Authored: Fri Dec 15 09:52:14 2017 +0700
Committer: Antoine Duprat <ad...@linagora.com>
Committed: Fri Dec 15 16:45:43 2017 +0100

----------------------------------------------------------------------
 .../cassandra/mail/CassandraMailboxPathDAO.java | 44 ++++++++++++++++++--
 1 file changed, 40 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/eeca3b56/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMailboxPathDAO.java
----------------------------------------------------------------------
diff --git a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMailboxPathDAO.java b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMailboxPathDAO.java
index f6eb674..8a06811 100644
--- a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMailboxPathDAO.java
+++ b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMailboxPathDAO.java
@@ -23,6 +23,7 @@ import static com.datastax.driver.core.querybuilder.QueryBuilder.bindMarker;
 import static com.datastax.driver.core.querybuilder.QueryBuilder.eq;
 import static com.datastax.driver.core.querybuilder.QueryBuilder.insertInto;
 import static com.datastax.driver.core.querybuilder.QueryBuilder.select;
+import static org.apache.james.mailbox.cassandra.GhostMailbox.TYPE;
 import static org.apache.james.mailbox.cassandra.table.CassandraMailboxPathTable.FIELDS;
 import static org.apache.james.mailbox.cassandra.table.CassandraMailboxPathTable.MAILBOX_ID;
 import static org.apache.james.mailbox.cassandra.table.CassandraMailboxPathTable.MAILBOX_NAME;
@@ -38,6 +39,7 @@ import javax.inject.Inject;
 import org.apache.james.backends.cassandra.init.CassandraTypesProvider;
 import org.apache.james.backends.cassandra.utils.CassandraAsyncExecutor;
 import org.apache.james.backends.cassandra.utils.CassandraUtils;
+import org.apache.james.mailbox.cassandra.GhostMailbox;
 import org.apache.james.mailbox.cassandra.ids.CassandraId;
 import org.apache.james.mailbox.cassandra.mail.utils.MailboxBaseTupleUtil;
 import org.apache.james.mailbox.cassandra.table.CassandraMailboxTable;
@@ -144,16 +146,50 @@ public class CassandraMailboxPathDAO {
                 .setUDTValue(NAMESPACE_AND_USER, mailboxBaseTupleUtil.createMailboxBaseUDT(mailboxPath.getNamespace(), mailboxPath.getUser()))
                 .setString(MAILBOX_NAME, mailboxPath.getName()))
             .thenApply(rowOptional ->
-                rowOptional.map(row -> new CassandraIdAndPath(
-                    CassandraId.of(row.getUUID(MAILBOX_ID)),
-                    mailboxPath)));
+                rowOptional.map(this::fromRowToCassandraIdAndPath))
+            .thenApply(value -> logGhostMailbox(mailboxPath, value));
     }
 
     public CompletableFuture<Stream<CassandraIdAndPath>> listUserMailboxes(String namespace, String user) {
         return cassandraAsyncExecutor.execute(
             selectAll.bind()
                 .setUDTValue(NAMESPACE_AND_USER, mailboxBaseTupleUtil.createMailboxBaseUDT(namespace, user)))
-            .thenApply(resultSet -> cassandraUtils.convertToStream(resultSet).map(this::fromRowToCassandraIdAndPath));
+            .thenApply(resultSet -> cassandraUtils.convertToStream(resultSet)
+                .map(this::fromRowToCassandraIdAndPath)
+                .peek(this::logReadSuccess));
+    }
+
+    /**
+     * See https://issues.apache.org/jira/browse/MAILBOX-322 to read about the Ghost mailbox bug.
+     *
+     * A missed read on an existing mailbox is the cause of the ghost mailbox bug. Here we log missing reads. Successful
+     * reads and write operations are also added in order to allow audit in order to know if the mailbox existed.
+     */
+    public Optional<CassandraIdAndPath> logGhostMailbox(MailboxPath mailboxPath, Optional<CassandraIdAndPath> value) {
+        if (value.isPresent()) {
+            CassandraIdAndPath cassandraIdAndPath = value.get();
+            logReadSuccess(cassandraIdAndPath);
+        } else {
+            GhostMailbox.logger()
+                .addField(GhostMailbox.MAILBOX_NAME, mailboxPath)
+                .addField(TYPE, "readMiss")
+                .log(logger -> logger.info("Read mailbox missed"));
+        }
+        return value;
+    }
+
+    /**
+     * See https://issues.apache.org/jira/browse/MAILBOX-322 to read about the Ghost mailbox bug.
+     *
+     * Read success allows to know if a mailbox existed before (mailbox write history might be older than this log introduction
+     * or log history might have been dropped)
+     */
+    private void logReadSuccess(CassandraIdAndPath cassandraIdAndPath) {
+        GhostMailbox.logger()
+            .addField(GhostMailbox.MAILBOX_NAME, cassandraIdAndPath.getMailboxPath())
+            .addField(TYPE, "readSuccess")
+            .addField(GhostMailbox.MAILBOX_ID, cassandraIdAndPath.getCassandraId())
+            .log(logger -> logger.info("Read mailbox succeeded"));
     }
 
     private CassandraIdAndPath fromRowToCassandraIdAndPath(Row row) {


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org