This is an automated email from the ASF dual-hosted git repository. rcordier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 87ebd46f5c31bfd13208ad7ea37ea57086de7d26 Author: Benoit Tellier <[email protected]> AuthorDate: Thu May 13 15:15:58 2021 +0700 [REFACTORING] CassandraMessageIdMapper: Remove a useless Mono.defer call Analise shows that the pipeline generated would always be the same. Removing it do not prevents the mailbox/cassandra to pass. Aggressive Mono.defer calls yield a little runtime overhead. --- .../apache/james/mailbox/cassandra/mail/CassandraMessageIdMapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageIdMapper.java b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageIdMapper.java index e5db7eaf..f724466 100644 --- a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageIdMapper.java +++ b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageIdMapper.java @@ -263,7 +263,7 @@ public class CassandraMessageIdMapper implements MessageIdMapper { } private Flux<Pair<MailboxId, UpdatedFlags>> flagsUpdateWithRetry(Flags newState, MessageManager.FlagsUpdateMode updateMode, MailboxId mailboxId, MessageId messageId) { - return Mono.defer(() -> updateFlags(mailboxId, messageId, newState, updateMode)) + return updateFlags(mailboxId, messageId, newState, updateMode) .retry(cassandraConfiguration.getFlagsUpdateMessageIdMaxRetry()) .onErrorResume(MailboxDeleteDuringUpdateException.class, e -> { LOGGER.info("Mailbox {} was deleted during flag update", mailboxId); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
