Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-19080

Inconsistent quota size computation when documents created then quickly deleted in bulk

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 7.10, 8.1
    • Fix Version/s: 8.3
    • Component/s: Quotas
    • Tags:
    • Backlog priority:
      700
    • Sprint:
      nxFG 8.2.1, nxFG 8.3.1
    • Story Points:
      5

      Description

      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}]
      

        Attachments

        1. test-cmis-creates-deletes.sh
          3 kB
        2. testFile.bin
          1024 kB
        3. server.log.zip
          151 kB

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days
                  2d