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/05 07:51:04 UTC
[james-project] 05/07: JAMES-3155 Failure to retrieve messages
should be propagated
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 4b4d70925e49bc59f5b3a051fa1ca0c677448516
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Mon Apr 27 09:07:10 2020 +0700
JAMES-3155 Failure to retrieve messages should be propagated
This allows event bus retries to be triggered correctly
---
.../james/mailbox/store/search/ListeningMessageSearchIndex.java | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/ListeningMessageSearchIndex.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/ListeningMessageSearchIndex.java
index 77a7a8b..6ce170b 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/ListeningMessageSearchIndex.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/search/ListeningMessageSearchIndex.java
@@ -34,8 +34,6 @@ import org.apache.james.mailbox.store.MailboxSessionMapperFactory;
import org.apache.james.mailbox.store.mail.MessageMapper.FetchType;
import org.apache.james.mailbox.store.mail.model.MailboxMessage;
import org.apache.james.util.streams.Iterators;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import com.google.common.collect.ImmutableList;
@@ -47,8 +45,6 @@ import reactor.core.publisher.Mono;
* notified about message changes. This will then allow to update the underlying index.
*/
public abstract class ListeningMessageSearchIndex implements MessageSearchIndex, MailboxListener.ReactiveGroupMailboxListener {
- private static final Logger LOGGER = LoggerFactory.getLogger(ListeningMessageSearchIndex.class);
-
protected static final int UNLIMITED = -1;
private final MailboxSessionMapperFactory factory;
private final SessionProvider sessionProvider;
@@ -113,9 +109,7 @@ public abstract class ListeningMessageSearchIndex implements MessageSearchIndex,
return Iterators.toFlux(factory.getMessageMapper(session)
.findInMailbox(mailbox, range, FetchType.Full, UNLIMITED));
} catch (Exception e) {
- // todo this error handling makes us loose messages!
- LOGGER.error("Could not retrieve message {} in mailbox {}", range.toString(), mailbox.getMailboxId().serialize(), e);
- return Flux.empty();
+ return Flux.error(e);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org