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
The following commit(s) were added to refs/heads/master by this push: new c1c61ea560 [FIX] Timeout for ReIndexing (#1547) c1c61ea560 is described below commit c1c61ea5603189d91eb844b70ec60b50ebf5c6a1 Author: Benoit TELLIER <btell...@linagora.com> AuthorDate: Sun May 7 13:12:19 2023 +0700 [FIX] Timeout for ReIndexing (#1547) --- .../java/org/apache/mailbox/tools/indexer/ReIndexerPerformer.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/ReIndexerPerformer.java b/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/ReIndexerPerformer.java index 9844ab7fb4..eafd50fe2a 100644 --- a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/ReIndexerPerformer.java +++ b/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/ReIndexerPerformer.java @@ -58,6 +58,7 @@ import reactor.core.publisher.Mono; public class ReIndexerPerformer { public static final int MAILBOX_CONCURRENCY = 1; public static final int ONE = 1; + public static final Duration INDEXING_TIMEOUT = Duration.ofMinutes(1); private static class ReIndexingEntry { private final Mailbox mailbox; @@ -308,9 +309,11 @@ public class ReIndexerPerformer { private Mono<Either<Failure, Result>> reIndex(ReIndexingEntry entry, RunningOptions runningOptions) { if (runningOptions.getMode() == RunningOptions.Mode.FIX_OUTDATED) { - return correctIfNeeded(entry); + return correctIfNeeded(entry) + .timeout(INDEXING_TIMEOUT); } - return index(entry); + return index(entry) + .timeout(INDEXING_TIMEOUT); } private Mono<Either<Failure, Result>> index(ReIndexingEntry entry) { --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org For additional commands, e-mail: notifications-h...@james.apache.org