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/04/29 01:14:51 UTC
[james-project] 17/27: JAMES-3138 Use concatMap upon quota
computation
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 1157a7b3e34fb837fb26d6019426b2d98b6503d8
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Sat Apr 25 11:13:43 2020 +0700
JAMES-3138 Use concatMap upon quota computation
This limit the parralelism of a background task, limiting its capacity
to overwhelm James and affect live traffic.
---
.../apache/james/mailbox/quota/task/RecomputeCurrentQuotasService.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mailbox/tools/quota-recompute/src/main/java/org/apache/james/mailbox/quota/task/RecomputeCurrentQuotasService.java b/mailbox/tools/quota-recompute/src/main/java/org/apache/james/mailbox/quota/task/RecomputeCurrentQuotasService.java
index 8508b8e..dbb5078 100644
--- a/mailbox/tools/quota-recompute/src/main/java/org/apache/james/mailbox/quota/task/RecomputeCurrentQuotasService.java
+++ b/mailbox/tools/quota-recompute/src/main/java/org/apache/james/mailbox/quota/task/RecomputeCurrentQuotasService.java
@@ -141,7 +141,7 @@ public class RecomputeCurrentQuotasService {
public Mono<Task.Result> recomputeCurrentQuotas(Context context) {
try {
return Iterators.toFlux(usersRepository.list())
- .flatMap(username -> recomputeUserCurrentQuotas(context, username))
+ .concatMap(username -> recomputeUserCurrentQuotas(context, username))
.reduce(Task.Result.COMPLETED, Task::combine);
} catch (UsersRepositoryException e) {
LOGGER.error("Error while accessing users from repository", e);
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org