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

Asset Publisher triggers the similar query several times to retrieve Asset Categories and Asset Tags

    Details

    • Branch Version/s:
      6.1.x, 6.0.x
    • Backported to Branch:
      Committed
    • Story Points:
      6
    • Fix Priority:
      4

      Description

      Steps to reproduce:

      1 - Create file called 'mysql.log' at ~/mysql-logs/ folder
      2 - Run 'chown mysql:mysql mysql.log'
      3 - Run 'mysql -u root -p' and enter your password once prompted
      4 - Run the following:
      mysql> set general_log_file = "/home/<username>/mysql-logs/mysql.log";
      mysql> set global general_log = "ON";
      (Note: Once done with testing you should switch general logging off)
      5 - Monitor the mysql.log file
      6 - Add several web contents with a tags and categories

      Observe that for each tag and category, there will be 2 similar queries called for each Web Content rendered in the AP. For example:

      30 Query    SELECT AssetCategory.categoryId as categoryId67_0_, AssetCategory.uuid_ as uuid2_67_0_, AssetCategory.groupId as groupId67_0_, AssetCategory.companyId as companyId67_0_, AssetCategory.userId as userId67_0_, AssetCategory.userName as userName67_0_, AssetCategory.createDate as createDate67_0_, AssetCategory.modifiedDate as modified8_67_0_, AssetCategory.parentCategoryId as parentCa9_67_0_, AssetCategory.leftCategoryId as leftCat10_67_0_, AssetCategory.rightCategoryId as rightCa11_67_0_, AssetCategory.name as name67_0_, AssetCategory.title as title67_0_, AssetCategory.description as descrip14_67_0_, AssetCategory.vocabularyId as vocabul15_67_0_ FROM AssetCategory INNER JOIN AssetEntries_AssetCategories ON (AssetEntries_AssetCategories.categoryId = AssetCategory.categoryId) AND (AssetEntries_AssetCategories.entryId = 10524)
      230 Query    SELECT AssetCategory.categoryId as categoryId67_0_, AssetCategory.uuid_ as uuid2_67_0_, AssetCategory.groupId as groupId67_0_, AssetCategory.companyId as companyId67_0_, AssetCategory.userId as userId67_0_, AssetCategory.userName as userName67_0_, AssetCategory.createDate as createDate67_0_, AssetCategory.modifiedDate as modified8_67_0_, AssetCategory.parentCategoryId as parentCa9_67_0_, AssetCategory.leftCategoryId as leftCat10_67_0_, AssetCategory.rightCategoryId as rightCa11_67_0_, AssetCategory.name as name67_0_, AssetCategory.title as title67_0_, AssetCategory.description as descrip14_67_0_, AssetCategory.vocabularyId as vocabul15_67_0_ FROM AssetCategory INNER JOIN AssetEntries_AssetCategories ON (AssetEntries_AssetCategories.categoryId = AssetCategory.categoryId) WHERE (AssetEntries_AssetCategories.entryId = 10524)
      330 Query    SELECT AssetTag.tagId as tagId71_0_, AssetTag.uuid_ as uuid2_71_0_, AssetTag.groupId as groupId71_0_, AssetTag.companyId as companyId71_0_, AssetTag.userId as userId71_0_, AssetTag.userName as userName71_0_, AssetTag.createDate as createDate71_0_, AssetTag.modifiedDate as modified8_71_0_, AssetTag.name as name71_0_, AssetTag.assetCount as assetCount71_0_ FROM AssetTag INNER JOIN AssetEntries_AssetTags ON (AssetEntries_AssetTags.tagId = AssetTag.tagId) AND (AssetEntries_AssetTags.entryId = 10524)
      430 Query    SELECT AssetTag.tagId as tagId71_0_, AssetTag.uuid_ as uuid2_71_0_, AssetTag.groupId as groupId71_0_, AssetTag.companyId as companyId71_0_, AssetTag.userId as userId71_0_, AssetTag.userName as userName71_0_, AssetTag.createDate as createDate71_0_, AssetTag.modifiedDate as modified8_71_0_, AssetTag.name as name71_0_, AssetTag.assetCount as assetCount71_0_ FROM AssetTag INNER JOIN AssetEntries_AssetTags ON (AssetEntries_AssetTags.tagId = AssetTag.tagId) WHERE (AssetEntries_AssetTags.entryId = 10524)
      530 Query    SELECT AssetCategory.categoryId as categoryId67_0_, AssetCategory.uuid_ as uuid2_67_0_, AssetCategory.groupId as groupId67_0_, AssetCategory.companyId as companyId67_0_, AssetCategory.userId as userId67_0_, AssetCategory.userName as userName67_0_, AssetCategory.createDate as createDate67_0_, AssetCategory.modifiedDate as modified8_67_0_, AssetCategory.parentCategoryId as parentCa9_67_0_, AssetCategory.leftCategoryId as leftCat10_67_0_, AssetCategory.rightCategoryId as rightCa11_67_0_, AssetCategory.name as name67_0_, AssetCategory.title as title67_0_, AssetCategory.description as descrip14_67_0_, AssetCategory.vocabularyId as vocabul15_67_0_ FROM AssetCategory INNER JOIN AssetEntries_AssetCategories ON (AssetEntries_AssetCategories.categoryId = AssetCategory.categoryId) AND (AssetEntries_AssetCategories.entryId = 10537)
      630 Query    SELECT AssetCategory.categoryId as categoryId67_0_, AssetCategory.uuid_ as uuid2_67_0_, AssetCategory.groupId as groupId67_0_, AssetCategory.companyId as companyId67_0_, AssetCategory.userId as userId67_0_, AssetCategory.userName as userName67_0_, AssetCategory.createDate as createDate67_0_, AssetCategory.modifiedDate as modified8_67_0_, AssetCategory.parentCategoryId as parentCa9_67_0_, AssetCategory.leftCategoryId as leftCat10_67_0_, AssetCategory.rightCategoryId as rightCa11_67_0_, AssetCategory.name as name67_0_, AssetCategory.title as title67_0_, AssetCategory.description as descrip14_67_0_, AssetCategory.vocabularyId as vocabul15_67_0_ FROM AssetCategory INNER JOIN AssetEntries_AssetCategories ON (AssetEntries_AssetCategories.categoryId = AssetCategory.categoryId) WHERE (AssetEntries_AssetCategories.entryId = 10537)
      730 Query    SELECT AssetTag.tagId as tagId71_0_, AssetTag.uuid_ as uuid2_71_0_, AssetTag.groupId as groupId71_0_, AssetTag.companyId as companyId71_0_, AssetTag.userId as userId71_0_, AssetTag.userName as userName71_0_, AssetTag.createDate as createDate71_0_, AssetTag.modifiedDate as modified8_71_0_, AssetTag.name as name71_0_, AssetTag.assetCount as assetCount71_0_ FROM AssetTag INNER JOIN AssetEntries_AssetTags ON (AssetEntries_AssetTags.tagId = AssetTag.tagId) AND (AssetEntries_AssetTags.entryId = 10537)
      830 Query    SELECT AssetTag.tagId as tagId71_0_, AssetTag.uuid_ as uuid2_71_0_, AssetTag.groupId as groupId71_0_, AssetTag.companyId as companyId71_0_, AssetTag.userId as userId71_0_, AssetTag.userName as userName71_0_, AssetTag.createDate as createDate71_0_, AssetTag.modifiedDate as modified8_71_0_, AssetTag.name as name71_0_, AssetTag.assetCount as assetCount71_0_ FROM AssetTag INNER JOIN AssetEntries_AssetTags ON (AssetEntries_AssetTags.tagId = AssetTag.tagId) WHERE (AssetEntries_AssetTags.entryId = 10537)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pani.gui Pani Gui (Inactive)
                Reporter:
                vilmos.papp Vilmos Papp
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 33 weeks ago