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

If CheckEntryMessageListener process failed, all datas won't deleted

    Details

      Description

      Description: If we empty Recycle Bin data in UI, it will delete those right datas even though one data can't be delete (due to exception occur). However, when CheckEntryMessageListener process failed, all datas won't deleted.

      Steps:
      1. Create one blog "blogEntry" (entryId=32843) and document "dlFileEntry".
      2. Remove them to Recycle Bin.
      3. Directly delete "blogEntry" from blogsentry table.
      delete from blogsentry where entryId=32843
      4. Go to Recycle Bin. Execute empty the Recycle Bin.
      Result: "dlFileEntry" will be deleted and the below error printed in log. It can explain that even though the delete process failed, but document can be deleted successful.

      com.liferay.blogs.kernel.exception.NoSuchEntryException: No BlogsEntry exists with the primary key 32843
      

      5. Create another document "dlFileEntry1", and then remove it to Recycle Bin.
      6. Close bundle. Set the below properties in portal-ext.
      trash.entry.check.interval=2
      trash.entries.max.age=3
      7. After 3 mins, restart bundle.
      8. When com.liferay.trash.web.internal.messaging.CheckEntryMessageListener executes, it should delete "blogEntry" and "dlFileEntry1" from Recycle Bin. However, due to "blogEntry" data is lost from blogsentry table. It will deleted failed. This affects "dlFileEntry1" can't be deleted. This is inconsistent with empty the Recycle Bin.

      Expected behavior: Even though "blogEntry" can't be deleted, it shouldn't affect "dlFileEntry1" can't be deleted. That is to say, one delete model process failed, it shouldn't affect the whole delete process failed. For example, when CheckEntryMessageListener executes and there are 10,000 datas matched with this delete situation. If due to one data exist data integrity issue so that it can't be deleted, and this will cause other 9999 datas can't deleted. It is better for me to let other 9999 datas deleted successful.

        Attachments

        1. fixed.png
          fixed.png
          25 kB
        2. reproduced.png
          reproduced.png
          22 kB

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 23 weeks, 1 day ago

                  Packages

                  Version Package
                  6.2.X EE
                  7.0.0 DXP FP20
                  7.0.3 CE GA4
                  7.0.0 DXP SP4
                  7.0.X EE
                  7.1.X
                  Master