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 c3c3df9682 [FIX] Old quota tables should not be recreated after 
migration to the new ones (#2783)
c3c3df9682 is described below

commit c3c3df9682a35c0efbd92dbef49238efa1531725
Author: Rene Cordier <rcord...@linagora.com>
AuthorDate: Sat Aug 2 05:44:43 2025 +0700

    [FIX] Old quota tables should not be recreated after migration to the new 
ones (#2783)
---
 .../james/modules/mailbox/CassandraMailboxQuotaLegacyModule.java  | 6 ++++++
 .../org/apache/james/modules/mailbox/CassandraQuotaModule.java    | 8 --------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git 
a/server/container/guice/cassandra/src/main/java/org/apache/james/modules/mailbox/CassandraMailboxQuotaLegacyModule.java
 
b/server/container/guice/cassandra/src/main/java/org/apache/james/modules/mailbox/CassandraMailboxQuotaLegacyModule.java
index d4fca3904a..0006c444b3 100644
--- 
a/server/container/guice/cassandra/src/main/java/org/apache/james/modules/mailbox/CassandraMailboxQuotaLegacyModule.java
+++ 
b/server/container/guice/cassandra/src/main/java/org/apache/james/modules/mailbox/CassandraMailboxQuotaLegacyModule.java
@@ -24,6 +24,9 @@ import 
org.apache.james.backends.cassandra.components.CassandraDataDefinition;
 import 
org.apache.james.mailbox.cassandra.modules.CassandraMailboxQuotaDataDefinition;
 import org.apache.james.mailbox.cassandra.quota.CassandraCurrentQuotaManagerV1;
 import org.apache.james.mailbox.cassandra.quota.CassandraCurrentQuotaManagerV2;
+import org.apache.james.mailbox.cassandra.quota.CassandraGlobalMaxQuotaDao;
+import org.apache.james.mailbox.cassandra.quota.CassandraPerDomainMaxQuotaDao;
+import org.apache.james.mailbox.cassandra.quota.CassandraPerUserMaxQuotaDao;
 import 
org.apache.james.mailbox.cassandra.quota.CassandraPerUserMaxQuotaManagerV1;
 import 
org.apache.james.mailbox.cassandra.quota.CassandraPerUserMaxQuotaManagerV2;
 import org.apache.james.mailbox.quota.CurrentQuotaManager;
@@ -40,6 +43,9 @@ import com.google.inject.name.Names;
 public class CassandraMailboxQuotaLegacyModule extends AbstractModule {
     @Override
     protected void configure() {
+        bind(CassandraGlobalMaxQuotaDao.class).in(Scopes.SINGLETON);
+        bind(CassandraPerDomainMaxQuotaDao.class).in(Scopes.SINGLETON);
+        bind(CassandraPerUserMaxQuotaDao.class).in(Scopes.SINGLETON);
         bind(CassandraCurrentQuotaManagerV1.class).in(Scopes.SINGLETON);
         bind(CassandraCurrentQuotaManagerV2.class).in(Scopes.SINGLETON);
         
bind(CurrentQuotaManager.class).to(CassandraCurrentQuotaManagerV1.class);
diff --git 
a/server/container/guice/cassandra/src/main/java/org/apache/james/modules/mailbox/CassandraQuotaModule.java
 
b/server/container/guice/cassandra/src/main/java/org/apache/james/modules/mailbox/CassandraQuotaModule.java
index 4bbe027d04..c63c873f33 100644
--- 
a/server/container/guice/cassandra/src/main/java/org/apache/james/modules/mailbox/CassandraQuotaModule.java
+++ 
b/server/container/guice/cassandra/src/main/java/org/apache/james/modules/mailbox/CassandraQuotaModule.java
@@ -24,10 +24,6 @@ import 
org.apache.james.backends.cassandra.components.CassandraMutualizedQuotaDa
 import 
org.apache.james.backends.cassandra.components.CassandraQuotaCurrentValueDao;
 import org.apache.james.backends.cassandra.components.CassandraQuotaLimitDao;
 import org.apache.james.events.EventListener;
-import 
org.apache.james.mailbox.cassandra.modules.CassandraMailboxQuotaDataDefinition;
-import org.apache.james.mailbox.cassandra.quota.CassandraGlobalMaxQuotaDao;
-import org.apache.james.mailbox.cassandra.quota.CassandraPerDomainMaxQuotaDao;
-import org.apache.james.mailbox.cassandra.quota.CassandraPerUserMaxQuotaDao;
 import org.apache.james.mailbox.quota.QuotaManager;
 import org.apache.james.mailbox.quota.QuotaRootDeserializer;
 import org.apache.james.mailbox.quota.QuotaRootResolver;
@@ -46,9 +42,6 @@ public class CassandraQuotaModule extends AbstractModule {
     protected void configure() {
         bind(CassandraQuotaLimitDao.class).in(Scopes.SINGLETON);
         bind(CassandraQuotaCurrentValueDao.class).in(Scopes.SINGLETON);
-        bind(CassandraGlobalMaxQuotaDao.class).in(Scopes.SINGLETON);
-        bind(CassandraPerDomainMaxQuotaDao.class).in(Scopes.SINGLETON);
-        bind(CassandraPerUserMaxQuotaDao.class).in(Scopes.SINGLETON);
         bind(DefaultUserQuotaRootResolver.class).in(Scopes.SINGLETON);
         bind(StoreQuotaManager.class).in(Scopes.SINGLETON);
 
@@ -58,7 +51,6 @@ public class CassandraQuotaModule extends AbstractModule {
         
bind(UserQuotaRootResolver.class).to(DefaultUserQuotaRootResolver.class);
 
         Multibinder<CassandraDataDefinition> cassandraDataDefinitions = 
Multibinder.newSetBinder(binder(), CassandraDataDefinition.class);
-        
cassandraDataDefinitions.addBinding().toInstance(CassandraMailboxQuotaDataDefinition.MODULE);
         
cassandraDataDefinitions.addBinding().toInstance(CassandraMutualizedQuotaDataDefinition.MODULE);
 
         bind(ListeningCurrentQuotaUpdater.class).in(Scopes.SINGLETON);


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org
For additional commands, e-mail: notifications-h...@james.apache.org

Reply via email to