Arsnael commented on code in PR #1673: URL: https://github.com/apache/james-project/pull/1673#discussion_r1294418962
########## mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraQuotaModule.java: ########## @@ -68,5 +70,26 @@ public interface CassandraQuotaModule { .withPartitionKey(CassandraGlobalMaxQuota.KEY, TEXT) .withColumn(CassandraGlobalMaxQuota.STORAGE, BIGINT) .withColumn(CassandraGlobalMaxQuota.MESSAGE, BIGINT)) + + .table(CassandraQuotaLimit.TABLE_NAME) + .comment("Holds quota limits.") + .options(options -> options + .withCaching(true, rows(CassandraConstants.DEFAULT_CACHED_ROW_PER_PARTITION))) + .statement(statement -> types -> statement + .withPartitionKey(CassandraQuotaLimit.QUOTA_COMPONENT, TEXT) + .withPartitionKey(CassandraQuotaLimit.QUOTA_SCOPE, TEXT) + .withPartitionKey(CassandraQuotaLimit.IDENTIFIER, TEXT) + .withClusteringColumn(CassandraQuotaLimit.QUOTA_TYPE, TEXT) Review Comment: The clustering keys allow that level of grain fetch Actually I read a bit fast at first but I agree with @quantranhong1999 ########## mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/modules/CassandraQuotaModule.java: ########## @@ -68,5 +70,26 @@ public interface CassandraQuotaModule { .withPartitionKey(CassandraGlobalMaxQuota.KEY, TEXT) .withColumn(CassandraGlobalMaxQuota.STORAGE, BIGINT) .withColumn(CassandraGlobalMaxQuota.MESSAGE, BIGINT)) + + .table(CassandraQuotaLimit.TABLE_NAME) + .comment("Holds quota limits.") + .options(options -> options + .withCaching(true, rows(CassandraConstants.DEFAULT_CACHED_ROW_PER_PARTITION))) + .statement(statement -> types -> statement + .withPartitionKey(CassandraQuotaLimit.QUOTA_COMPONENT, TEXT) + .withPartitionKey(CassandraQuotaLimit.QUOTA_SCOPE, TEXT) + .withPartitionKey(CassandraQuotaLimit.IDENTIFIER, TEXT) + .withClusteringColumn(CassandraQuotaLimit.QUOTA_TYPE, TEXT) Review Comment: The clustering keys allow that level of grain fetch, if my memory is right Actually I read a bit fast at first but I agree with @quantranhong1999 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org For additional commands, e-mail: notifications-h...@james.apache.org