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/07 02:12:44 UTC

[james-project] 20/22: JAMES-3148 DeleteMessageListener: Add class javaDoc

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 f4ceba76c686489202431dc7d85a02b20dc0869b
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Fri Apr 17 14:39:50 2020 +0700

    JAMES-3148 DeleteMessageListener: Add class javaDoc
---
 .../apache/james/mailbox/cassandra/DeleteMessageListener.java | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/DeleteMessageListener.java b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/DeleteMessageListener.java
index 521a59a..ce1a3ce 100644
--- a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/DeleteMessageListener.java
+++ b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/DeleteMessageListener.java
@@ -55,6 +55,17 @@ import org.apache.james.mailbox.store.mail.MessageMapper;
 import reactor.core.publisher.Flux;
 import reactor.core.publisher.Mono;
 
+/**
+ * This listener cleans Cassandra metadata up. It retrieves dandling unreferenced metadata after the delete operation
+ * had been conducted out. Then it deletes the lower levels first so that upon failures undeleted metadata can still be
+ * reached.
+ *
+ * This cleanup is not needed for strict correctness from a MailboxManager point of view thus it could be carried out
+ * asynchronously, via mailbox listeners so that it can be retried.
+ *
+ * Mailbox listener failures lead to eventBus retrying their execution, it ensures the result of the deletion to be
+ * idempotent.
+ */
 public class DeleteMessageListener implements MailboxListener.GroupMailboxListener {
     private static final Optional<CassandraId> ALL_MAILBOXES = Optional.empty();
 


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