Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-56311

Activation of Staging is handling site contents twice: one for private pages and other for public pages



      Steps to Reproduce

      1. Before starting Liferay add following lines to portal-ext.properties, to avoid deleting temporary generated LAR files:
        staging.delete.temp.lar.on.failure = false
        staging.delete.temp.lar.on.success = false
      2. Create a new site
      3. Add 2 empty pages at both private and public sections of site
      4. At webcontent, create for example 4 webcontents
      5. Activate debug traces of staging:
        • At 6.2.x: update existing categories with package name containg lar and change it to debug
        • At master: add new category with package name com.liferay.exportimport with debug level
      6. Activate local staging, process will execute the activation of "private pages" and "public pages" as two serial separate process
      7. Check log output in order to verify which objects are published:
        You will see following traces, one for each JournalArticle:
        18:33:13,157 DEBUG [liferay/background_task-1][LoggerExportImportLifecycleListener:447] Staged model com.liferay.journal.model.JournalArticle import succeeded
        • Wrong behavior: the webcontents are publised twice, for example: "2 private pages + 4 wc" and "2 public pages + 4 wc" and 8 traces are printed at log file
        • Expected behavior: the webcontents are publised once, for example: "2 private pages + 4 wc" and "only 2 public pages without wc" and only 4 traces are printed at log file
      8. Also search at log file lines with Kept temporary LAR file text
        1. For example:
          Line 85666: 18:49:17,505 DEBUG [liferay/background_task-1][BaseStagingBackgroundTaskExecutor:83] Kept temporary LAR file D:\Liferay\master-liferay-portal\tomcat-7.0.62\temp\20836-20151117184840003.lar
          Line 86577: 18:49:41,907 DEBUG [liferay/background_task-2][BaseStagingBackgroundTaskExecutor:83] Kept temporary LAR file D:\Liferay\master-liferay-portal\tomcat-7.0.62\temp\20836-20151117184917541.lar
        2. Two temp lar are generated: one for private pages publish operation and another for public pages publish operation
        3. Unzip both lar files, check journalarticles at group\<groupId>\com.liferay.journal.model.JournalArticle
          • Wrong behavior: both LAR contains the 4 webcontents
          • Expected behavior: only first LAR contains the 4 webcontents. Second temporary LAR does not contain any webcontent as they were published at first publish operation

      This issue can be problematic with sites that are very large.
      If you have a site that only contents spends 4 hours during activation, we are duplicating that time, for example:

      • Public pages: 2 hour for pages + 4 hours for contents
      • Private pages: 10 minutes for pages + 4 hours for contents (again)

      So we could reduce times from: 2h+4h+4h=10h to 2h+4h=6h


        Issue Links



              lu.liu Lu Liu
              jorge.diaz Jorge Diaz
              Kiyoshi Lee Kiyoshi Lee
              1 Vote for this issue
              4 Start watching this issue


                7 years, 28 weeks, 5 days ago


                  Version Package
                  7.0.0 Alpha 2