Arsnael commented on code in PR #2836:
URL: https://github.com/apache/james-project/pull/2836#discussion_r2425803107
##########
server/protocols/webadmin/webadmin-jmap/src/main/java/org/apache/james/webadmin/data/jmap/RunRulesOnMailboxService.java:
##########
@@ -75,6 +93,11 @@ public Mono<Task.Result> runRulesOnMailbox(Username
username, MailboxName mailbo
return
Mono.from(mailboxManager.getMailboxReactive(MailboxPath.forUser(username,
mailboxName.asString()), mailboxSession))
.flatMapMany(messageManager ->
Flux.from(messageManager.getMessagesReactive(MessageRange.all(),
FetchGroup.HEADERS, mailboxSession))
.flatMap(Throwing.function(messageResult ->
runRulesOnMessage(ruleMatcher, messageResult, mailboxSession, context)),
DEFAULT_CONCURRENCY))
+ .onErrorResume(TooManyAppliedActionsException.class, e -> {
+ LOGGER.info("Maximum number of actions exceeded for mailbox {}
of user {}", mailboxName.asString(), username);
+ context.setMaximumAppliedActionExceeded();
+ return Mono.just(Task.Result.PARTIAL);
Review Comment:
Why failing? I thought it was just applying a maximum of operations on a
mailbox, like a batch? Can we really say we fail if we reach the limit?
--
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]