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

Data loss when more Liferay installations set to same bucket on Amazon S3

Details

    • 4

    Description

      When more independent Liferay installations are set to Amazon S3 and same bucket, data can be rewritten with no information at application server log file at all.

      File structure is composed from unique document ID. If database files are separated from each other, Liferay doesn't check if destination location exists and write document, no matter if there any file exists with same document ID.

      Steps to reproduce:

      1. Set up two Liferay installations with Amazon S3 and the same bucket.
      2. Under same company and web ID upload text document to first Portal.
      3. Upload another text document with same type to second Portal.
      4. Download uploaded file from first Portal and check it's content. The downloaded file is the one uploaded via second Portal and expected is to have file uploaded via first Portal

      My exact steps:

      1. Set up two installations of "Liferay Portal 6.2.0 CE M6 bundled with Tomcat".
      2. Set up portal-ext.properties files to Amazon S3 on the same bucket.
        • Add the following lines, referencing active Amazon S3 Store credentials:
          dl.store.s3.bucket.name=
          dl.store.s3.access.key=
          dl.store.s3.secret.key=
          dl.store.impl=com.liferay.portlet.documentlibrary.store.S3Store
          
      3. Start both instances and delete all existing sample files.
      4. Create text documents A.txt and upload it to documents library.
      5. Create text document B.txt with different content and upload it to second installation's documents library.
      6. Try to download original file A from first installation and check that are correct. In my case, insted of A document I get B

      It might be good to check if destination directory exists or not. If destination is used, increment document ID and try again (as probably done for local file storage).

      On local file system as a repository issue does not appear and process works as expected. Liferay detects that some file with certain document ID exists already and automatically increases document ID until it finds suitable free document ID.

      Attachments

        Issue Links

          Activity

            People

              sergio.gonzalez Sergio Gonzalez (Inactive)
              jan.profiq Jan Hájovský (Inactive)
              Kiyoshi Lee Kiyoshi Lee
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                9 years, 37 weeks, 1 day ago

                Packages

                  Version Package
                  6.2.0 CE M6
                  6.2.0 CE B1