Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-22025

eZIE causes wrong scope in "ezdfsfile" table entries

    Details

      Description

      In a DFS-clustered environment, editing and saving images using the eZIE extension will cause entries in the "ezdfsfile" table to have a scope of "1". The net result of this is that expired entries will not be purged.

      Steps to reproduce:

      1. Prepare an eZ Publish 4.5 installation, fully patched and set up in DFS cluster mode;
      2. Add a new image in media library;
      3. Examine the "ezdfsfile" table - there should be no records with the "scope" field set to "1";
      4. Edit the image with eZIE, and publish it;
      5. Re-examine the "ezdfsfile" table - there should now be records with the "scope" field set to "1", e.g.:

      mysql> SELECT * FROM ezdfsfile WHERE scope = 1;
      +------------------------------------------------------------------+-----------------------------------------------------+----------------------------------+----------+-------+-------+------------+---------+--------+
      | name                                                             | name_trunk                                          | name_hash                        | datatype | scope | size  | mtime      | expired | status |
      +------------------------------------------------------------------+-----------------------------------------------------+----------------------------------+----------+-------+-------+------------+---------+--------+
      | var/ezflow_site/cache/public/ezie/14/238-2/thumb-3-tank1.jpg.jpg | var/ezflow_site/cache/public/ezie/14/238-2/thumb-3- | 43b53382ec97e4de8800939ca14db284 | misc     | 1     | 12532 | 1385493779 |       0 |      0 |
      | var/ezflow_site/cache/public/ezie/14/238-2/thumb-1-tank1.jpg.jpg | var/ezflow_site/cache/public/ezie/14/238-2/thumb-1- | 6c3af21e18d134c98b18fd961da38d7d | misc     | 1     | 12522 | 1385493776 |       0 |      0 |
      | var/ezflow_site/cache/public/ezie/14/238-2/3-tank1.jpg.jpg       | var/ezflow_site/cache/public/ezie/14/238-2/3-       | 74f2153fc486fb6e13b1aaefbe7e83e5 | misc     | 1     | 15051 | 1385493779 |       0 |      0 |
      | var/ezflow_site/cache/public/ezie/14/238-2/2-tank1.jpg.jpg       | var/ezflow_site/cache/public/ezie/14/238-2/2-       | 8309c6d6a8244efe5dfd4318a86f9ee7 | misc     | 1     | 14694 | 1385493778 |       0 |      0 |
      | var/ezflow_site/cache/public/ezie/14/238-2/thumb-2-tank1.jpg.jpg | var/ezflow_site/cache/public/ezie/14/238-2/thumb-2- | b591a6575d68cac8cf92a952bcd1de16 | misc     | 1     | 12523 | 1385493778 |       0 |      0 |
      | var/ezflow_site/cache/public/ezie/14/238-2/thumb-0-tank1.jpg.jpg | var/ezflow_site/cache/public/ezie/14/238-2/thumb-0- | e020a0a51231da7837da06e693c5dc8c | misc     | 1     | 12335 | 1385493771 |       0 |      0 |
      | var/ezflow_site/cache/public/ezie/14/238-2/1-tank1.jpg.jpg       | var/ezflow_site/cache/public/ezie/14/238-2/1-       | f6c7bd6c804070bae7e50337a71010cb | misc     | 1     | 15006 | 1385493776 |       0 |      0 |
      +------------------------------------------------------------------+-----------------------------------------------------+----------------------------------+----------+-------+-------+------------+---------+--------+
      7 rows in set, 56 warnings (0.00 sec)
      

        Issue Links

          Activity

          Hide
          Bertrand Dunogier added a comment -

          Why ezie stores files to cluster
          So that in a load balanced environment, image files manipulated by ezie are available even if the user jumps to another cluster node.

          Show
          Bertrand Dunogier added a comment - Why ezie stores files to cluster So that in a load balanced environment, image files manipulated by ezie are available even if the user jumps to another cluster node.
          Hide
          Bertrand Dunogier added a comment - - edited

          ezcache.php --clear-all --purge removes the entries from ezdfsfile
          dfscleanup.php -B -D removes the files from the NFS storage (even if the directories are left empty)

          But above, you say that expired entries won't be cleared from the ezdfsfile table. How come ? Both ezcache.php and dfscleanup.php seem to remove them, so what are they not removed by ?

          We probably should set a proper scope on them, but it would be a custom one anyway.

          So far I don't see how this is a bug. We could enhance it, but I don't see the feature loss or misbehaviour from a user's perspective.

          Show
          Bertrand Dunogier added a comment - - edited ezcache.php --clear-all --purge removes the entries from ezdfsfile dfscleanup.php -B -D removes the files from the NFS storage (even if the directories are left empty) But above, you say that expired entries won't be cleared from the ezdfsfile table. How come ? Both ezcache.php and dfscleanup.php seem to remove them, so what are they not removed by ? We probably should set a proper scope on them, but it would be a custom one anyway. So far I don't see how this is a bug. We could enhance it, but I don't see the feature loss or misbehaviour from a user's perspective.
          Hide
          Bertrand Dunogier added a comment - - edited

          How would you purge regular items ?

          Show
          Bertrand Dunogier added a comment - - edited How would you purge regular items ?
          Hide
          Bertrand Dunogier added a comment - - edited

          Sounds good. We can change the scope.

          Do you agree that the maintenance operations, such as dfscleanup.php, are enough to "repair" the existing damages ?

          Show
          Bertrand Dunogier added a comment - - edited Sounds good. We can change the scope. Do you agree that the maintenance operations, such as dfscleanup.php , are enough to "repair" the existing damages ?
          Hide
          Bertrand Dunogier added a comment -

          Pull request ezie#18.

          Show
          Bertrand Dunogier added a comment - Pull request ezie#18 .
          Hide
          Bertrand Dunogier added a comment -

          Merged into master ab482ef.

          Show
          Bertrand Dunogier added a comment - Merged into master ab482ef .
          Hide
          Pedro Resende (Inactive) added a comment -

          Tested and approved Q.A.

          Show
          Pedro Resende (Inactive) added a comment - Tested and approved Q.A.

            People

            • Assignee:
              Unassigned
              Reporter:
              Nuno Oliveira (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 7 hours, 45 minutes
                7h 45m