You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2020/04/29 01:14:48 UTC

[james-project] 14/27: JAMES-3138 Documentation for Recomputing current quotas endpoint

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 251a73d1a7543e98610c3025528dfbe218d6013a
Author: Rene Cordier <rc...@linagora.com>
AuthorDate: Tue Apr 14 16:18:23 2020 +0700

    JAMES-3138 Documentation for Recomputing current quotas endpoint
---
 src/site/markdown/server/manage-webadmin.md | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/src/site/markdown/server/manage-webadmin.md b/src/site/markdown/server/manage-webadmin.md
index 7efda46..384d4f6 100644
--- a/src/site/markdown/server/manage-webadmin.md
+++ b/src/site/markdown/server/manage-webadmin.md
@@ -974,6 +974,7 @@ Response codes:
  - [Updating the quota size for a user](#Updating_the_quota_size_for_a_user)
  - [Deleting the quota size for a user](#Deleting_the_quota_size_for_a_user)
  - [Searching user by quota ratio](#Searching_user_by_quota_ratio)
+ - [Recomputing current quotas for users](#Recomputing_current_quotas_for_users)
 
 ### Getting the quota for a user
 
@@ -1226,6 +1227,34 @@ Response codes:
 
  - 200: List of users had successfully been returned.
  - 400: Validation issues with parameters
+ 
+### Recomputing current quotas for users
+
+This task is available on top of Cassandra & JPA products.
+
+```
+curl -XPOST /quota/users?task=RecomputeCurrentQuotas
+```
+
+Will recompute current quotas (count and size) for all users stored in James.
+
+James maintains per quota a projection for current quota count and size. As with any projection, it can 
+go out of sync, leading to inconsistent results being returned to the client.
+
+[More details about endpoints returning a task](#Endpoints_returning_a_task).
+
+The scheduled task will have the following type `recompute-current-quotas` and the following `additionalInformation`:
+
+```
+{
+  "type":"recompute-current-quotas",
+  "processedQuotaRoots": 3,
+  "failedQuotaRoots": ["#private&bob@localhost"]
+}
+```
+
+**WARNING**: this task do not take into account concurrent modifications upon a single current quota recomputation. 
+Rerunning the task will *eventually* provide the consistent result.
 
 ## Administrating quotas by domains
 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org