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

Fix algorithm to unpublish a document

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 10.10
    • Fix Version/s: 10.10-HF40, 11.x, 2021.2
    • Component/s: Publishing
    • Release Notes Summary:
      Unpublishing a source document loads only the published documents.
    • Backlog priority:
      900
    • Sprint:
      nxplatform #27
    • Story Points:
      3

      Description

      The current algorithm is doing the following steps:

      1. run a query to get all the children of a given section (without the hidden docs and the publish spaces)
      2. all the DocumentModels which match the previous query are loaded into memory : if a section contains 10 thousands (or more) of published documents in the section, it may consume all of the available heap with 3 or 4 concurrent threads.
      3. it loops over all (published) documents to find which ones are a published version of a given document
      4. then the matching documents are deleted/unpublished

       

      Iterating over all the children of a section could be avoided by leveraging an existing property, ecm:proxyVersionableId, which stores the id of the source document which was published to this section.

      Then a query like

      SELECT * FROM Document WHERE ecm:parentId = 'sectionId' AND ecm:isProxy = 1 AND ecm:proxyVersionableId = 'documentId'
      

      would be more efficient and load only the required documentModel into memory.

      NB: not sure which property is the best between proxyVersionableId and versionVersionableId

        Attachments

          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 - 5 hours
                5h

                  PagerDuty

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