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


##########
mailbox/postgres/src/main/java/org/apache/james/mailbox/postgres/mail/PostgresMessageMapper.java:
##########
@@ -290,7 +290,7 @@ private Flux<UpdatedFlags> 
updatedFlags(List<ComposedMessageIdWithMetaData> list
                                             FlagsUpdateCalculator 
flagsUpdateCalculator) {
         return modSeqProvider.nextModSeqReactive(mailbox.getMailboxId())
             .flatMapMany(newModSeq -> Flux.fromIterable(listMessagesMetaData)
-                .flatMap(messageMetaData -> updateFlags(messageMetaData, 
flagsUpdateCalculator, newModSeq)));
+                .concatMap(messageMetaData -> updateFlags(messageMetaData, 
flagsUpdateCalculator, newModSeq)));

Review Comment:
   Range updates are frequent in IMAP. doing this sequentially might be a show 
stopper.
   
   How about using `flatMapSequential` ?
   
   Also, we are missing the concurrency control: let's use the default 
concurrency defined in reactor utils.



-- 
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