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

Quota exception not raised when version is incremented

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 9.10
    • Fix Version/s: 9.10-HF30, 10.10-HF05, 11.1
    • Component/s: Quotas
    • Release Notes Summary:
      Quotas are checked when creating a version.
    • Tags:
    • Backlog priority:
      700
    • Upgrade notes:
      Hide

      Behavior of quota computation and check has changed for versioning.
      Now we compute and check the quotas on the aboutToCheckIn event instead of computing the quotas on the documentCheckedIn one and checking the quotas on the documentCheckedOut one.

      You can have this behavior on previous LTS version by overriding nuxeo.quota.size.check.on.aboutToCheckIn property:

        <require>org.nuxeo.ecm.quota.contrib</require>
      
        <extension target="org.nuxeo.runtime.ConfigurationService" point="configuration">
          <property name="nuxeo.quota.size.check.on.aboutToCheckIn">true</property>
        </extension>
      
      Show
      Behavior of quota computation and check has changed for versioning. Now we compute and check the quotas on the aboutToCheckIn event instead of computing the quotas on the documentCheckedIn one and checking the quotas on the documentCheckedOut one. You can have this behavior on previous LTS version by overriding nuxeo.quota.size.check.on.aboutToCheckIn property: <require>org.nuxeo.ecm.quota.contrib</require> <extension target= "org.nuxeo.runtime.ConfigurationService" point= "configuration" > <property name= "nuxeo.quota.size.check.on.aboutToCheckIn" > true </property> </extension>
    • Sprint:
      nxcore 11.1.6
    • Story Points:
      3

      Description

      1. install Nuxeo
      2. install the quota addon
      3. install JSF UI
      4. create a workspace
      5. set 200kb max quota space on the workspace
      6. import a picture above 150kb but less than 200kb
      7. observe the picture is correctly imported
      8. attempt to import another picture of similar size
      9. observe an error is displayed
      10. set the quota max to 100kb
      11. attempt to modify the picture document description (don't increment the version)
      12. observe an error is raised about maximum quota space exceeded
      13. observe the following exception is in the server logs:
        Caused by: org.nuxeo.ecm.quota.size.QuotaExceededException: label.quotaException.QuotaExceeded
        	at org.nuxeo.ecm.quota.size.DocumentsSizeUpdater.checkQuota(DocumentsSizeUpdater.java:369)
        	at org.nuxeo.ecm.quota.size.DocumentsSizeUpdater.processDocumentCreated(DocumentsSizeUpdater.java:181)
        	at org.nuxeo.ecm.quota.AbstractQuotaStatsUpdater.updateStatistics(AbstractQuotaStatsUpdater.java:110)
        	at org.nuxeo.ecm.quota.QuotaStatsServiceImpl$1.run(QuotaStatsServiceImpl.java:100)
        	at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:117)
        	at org.nuxeo.ecm.quota.QuotaStatsServiceImpl.updateStatistics(QuotaStatsServiceImpl.java:103)
        	at org.nuxeo.ecm.quota.QuotaStatsListener.handleEvent(QuotaStatsListener.java:76)
        	at org.nuxeo.ecm.core.event.impl.EventServiceImpl.fireEvent(EventServiceImpl.java:243)
        
      14. attempt to modify the picture document description (increment the versions)
      15. observe the modification is accepted an no error is displayed

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 6 hours
                1d 6h

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.