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
    • Similar Issues:
      Show 5 results 

      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)
      

        Activity

        Hide
        Pani Gui (Inactive) added a comment -

        PASSED Manual Testing following the steps in the description.

        Reproduced on:
        Tomcat 7.0 + MySQL 5. Portal 6.1.20 EE GA2.

        There are 2 similar queries called for web content rendered in the Asset Publisher.

        Fixed on:
        Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: c9222a0f0a96cc92876da2ee92419a5e13dcb76c.
        Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 40abbcaa3e41cd72921061e810ab1bbdfc3d00f7.

        There will not 2 similar queries called for web content when creating contents every time.

        Show
        Pani Gui (Inactive) added a comment - PASSED Manual Testing following the steps in the description. Reproduced on: Tomcat 7.0 + MySQL 5. Portal 6.1.20 EE GA2. There are 2 similar queries called for web content rendered in the Asset Publisher. Fixed on: Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: c9222a0f0a96cc92876da2ee92419a5e13dcb76c. Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 40abbcaa3e41cd72921061e810ab1bbdfc3d00f7. There will not 2 similar queries called for web content when creating contents every time.
        Hide
        Pani Gui (Inactive) added a comment -

        PASSED Manual Testing following the steps in the description.

        Fixed on:
        Tomcat 6.0.33 + MySQL 5.5.21. Portal 6.0.x GIT ID: 0ffdb5bf535d4aa94a51240836badb76693957ea.

        There will not 2 similar queries called for web content when creating contents every time.

        Show
        Pani Gui (Inactive) added a comment - PASSED Manual Testing following the steps in the description. Fixed on: Tomcat 6.0.33 + MySQL 5.5.21. Portal 6.0.x GIT ID: 0ffdb5bf535d4aa94a51240836badb76693957ea. There will not 2 similar queries called for web content when creating contents every time.

          People

          • Assignee:
            Pani Gui (Inactive)
            Reporter:
            Vilmos Papp
            Recent user:
            Christopher Lui
            Participants of an Issue:
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 11 weeks, 3 days ago

              Development

                Structure Helper Panel