You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2021/03/08 05:44:35 UTC
[james-project] 25/30: MAILBOX-405 Add a retry upon rename
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 f050e146532e52829f96632e2f8449201f855bf3
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Wed Mar 3 11:05:11 2021 +0700
MAILBOX-405 Add a retry upon rename
Cassandra do not leverage transactionnality, hence we should try
to minimize half performed operations. Retries is a way to achieve
this and could be seen as a short term mitigation.
---
.../main/java/org/apache/james/mailbox/store/StoreMailboxManager.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
index df7eb76..00202b3 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMailboxManager.java
@@ -578,6 +578,7 @@ public class StoreMailboxManager implements MailboxManager {
.newPath(sub.generateAssociatedPath())
.build(),
new MailboxIdRegistrationKey(sub.getMailboxId())))
+ .retryWhen(Retry.backoff(5, Duration.ofMillis(10)))
.then(Mono.fromRunnable(() -> LOGGER.debug("Rename mailbox sub-mailbox {} to {}", subOriginalName, subNewName)));
}, DEFAULT_CONCURRENCY)
.then());
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org