Skip to content

[FIX] Improvments regarding mailbox consistency (backport 3.9.x)#3067

Merged
chibenwa merged 16 commits into
apache:3.9.xfrom
chibenwa:bp-mbx-const-3-9-x
Jun 23, 2026
Merged

[FIX] Improvments regarding mailbox consistency (backport 3.9.x)#3067
chibenwa merged 16 commits into
apache:3.9.xfrom
chibenwa:bp-mbx-const-3-9-x

Conversation

@chibenwa

Copy link
Copy Markdown
Contributor

No description provided.

@quantranhong1999

Copy link
Copy Markdown
Member

Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure

  |   |   | /home/jenkins/jenkins-agent/workspace/james_ApacheJames_PR-3067/server/container/mailbox-adapter/src/test/java/org/apache/james/adapter/mailbox/QuotaUsernameChangeTaskStepTest.java:[101,85] constructor RecomputeMailboxCurrentQuotasService in class org.apache.james.mailbox.quota.task.RecomputeMailboxCurrentQuotasService cannot be applied to given types;
  |   |   | required: org.apache.james.mailbox.quota.CurrentQuotaManager,org.apache.james.mailbox.store.quota.CurrentQuotaCalculator,org.apache.james.mailbox.quota.UserQuotaRootResolver,org.apache.james.mailbox.SessionProvider,org.apache.james.mailbox.MailboxManager
  |   |   | found: org.apache.james.mailbox.quota.CurrentQuotaManager,org.apache.james.mailbox.store.quota.CurrentQuotaCalculator,org.apache.james.mailbox.quota.UserQuotaRootResolver,org.apache.james.mailbox.SessionProvider,org.apache.james.mailbox.inmemory.InMemoryMailboxManager,org.apache.james.mailbox.quota.QuotaManager,org.apache.james.events.EventBus
  |   |   | reason: actual and formal argument lists differ in length

When renaming a mailbox across namespaces, StoreMailboxManager preloads the
mailbox and its children then renames them through renameSubMailboxes.

That helper updated the mailbox name and user but not the namespace, causing
id-based renames across namespaces to keep the old namespace in storage.

Update the namespace during rename and add a regression test covering both the
renamed mailbox and one child mailbox.
@quantranhong1999

Copy link
Copy Markdown
Member

I backported #3069 (comment).

And also fixed the compilation issue.

@chibenwa

Copy link
Copy Markdown
Contributor Author

Huge thanks!

@chibenwa chibenwa merged commit 0a186ea into apache:3.9.x Jun 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants