chibenwa commented on code in PR #2893:
URL: https://github.com/apache/james-project/pull/2893#discussion_r2643100825


##########
mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/MailboxMergingTaskRunner.java:
##########
@@ -76,7 +76,8 @@ private Task.Result moveMessages(CassandraId oldMailboxId, 
CassandraId newMailbo
         return cassandraMessageIdDAO.retrieveMessages(oldMailboxId, 
MessageRange.all(), Limit.unlimited())
             .map(CassandraMessageMetadata::getComposedMessageId)
             .map(ComposedMessageIdWithMetaData::getComposedMessageId)
-            .concatMap(messageId -> Mono.fromCallable(() -> 
moveMessage(newMailboxId, messageId, session, 
context)).subscribeOn(ReactorUtils.BLOCKING_CALL_WRAPPER))
+            .flatMap(messageId -> Mono.fromCallable(() -> 
moveMessage(newMailboxId, messageId, session, context))
+                .subscribeOn(ReactorUtils.BLOCKING_CALL_WRAPPER), 
ReactorUtils.DEFAULT_CONCURRENCY)

Review Comment:
   I see no reason not to make this code path reactive.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to