How to reproduce:
- Install addon nuxeo-quota
- set log level of org.nuxeo.ecm.quota.size to DEBUG in log4j.xml
- truncate tables document_size_statistics and document_size_statistics if already exist
- Start the Nuxeo Platform
- create workspace CMISTEST workspace
- navigate to ADMIN > Quotas Statistics, tab Compute Initial Statistics and trigger initial computation for both quta updaters
- download to your workstation attached file cmis-test-creates-deletes.sh and testFile.bin
- Execute the attached shell script with the following command (10 threads creating and deleting documents+files in bulk), it creates massively File documents, attaches file testFile.bin (see attachments) to them and then deletes them:
for i in {1..10}; do ./test-cmis-creates-deletes.sh & done
- After 1 minutes of execution, stop script execution with the following command:
touch test-cmis-creates-deletes.sh.stop
Expected result:
totalSize, Live Documents Size and Archived Versions Size should be 0.
Actual result:
totalSize, Live Documents Size and Archived Versions Size are greater than 0.
curl commands to retrieve quota:
Command:
curl -u Administrator:Administrator -H "Content-Type:application/json+nxrequest" -d "{\"params\":{\"documentRef\":\"/default-domain/workspaces/CMISTEST workspace\"}}" http://localhost:8080/nuxeo/api/v1/repo/default/path/@op/Quotas.GetInfo
Result:
{"entity-type":"org.nuxeo.ecm.quota.automation.SimpleQuotaInfo","value":{"totalSize":161480704,"innerSize":0,"maxQuota":-1}}
Command:
curl -u Administrator:Administrator -H "Content-Type:application/json+nxrequest" -d "{\"params\":{\"documentRef\":\"/default-domain/workspaces/CMISTEST workspace\"}}" http://localhost:8080/nuxeo/api/v1/repo/default/path/@op/Quotas.GetStatistics
Result:
[{"label":"Live Documents Size:77 MBytes","data":80740352},{"label":"Trash Size :0 KBytes","data":0},{"label":"Archived Versions Size :77 MBytes","data":80740352}]
- depends on
-
NXP-19413 Make quotas computation synchronous
- Resolved