Details

      Description

      Steps to reproduce:

      1. Enable async publishing. Go to /settings/override/content.ini.append.php and add:

      [PublishingSettings]
      AsynchronousPublishing=enabled
      

      2. Clear cache so that setting take effect;
      3. Run ezasynchronouspublisher.php:

      $php bin/php/ezasynchronouspublisher.php --daemon
      

      4. Examine contents of expiry.php:

      $cat var/ezdemo_site/cache/expiry.php
      <?php
      $Timestamps = array (
        'class-identifier-cache' => 1420742423,
        'user-info-cache' => 1420742422,
        'image-manager-alias' => 1420742422,
        'content-tree-menu' => 1420742422,
        'active-extensions-cache' => 1420742422,
        'state-limitations' => 1417191404,
        'content-view-cache' => 1420742422,
        'global-template-block-cache' => 1420742422,
        'ts-translation-cache' => 1420742422,
        'content-complex-viewmode-cache' => 1420742765,
        'template-block-cache' => 1420742765,
      );
      

      5. Clear cache. For issue reproduction, it sufficed to clear all caches from admin interface;
      6. Examine contents of expiry.php:

      $cat var/ezdemo_site/cache/expiry.php
      <?php
      $Timestamps = array (
        'class-identifier-cache' => 1420742839,
        'user-info-cache' => 1420742838,
        'image-manager-alias' => 1420742838,
        'content-tree-menu' => 1420742838,
        'active-extensions-cache' => 1420742838,
        'state-limitations' => 1417191404,
        'content-view-cache' => 1420742838,
        'global-template-block-cache' => 1420742838,
        'ts-translation-cache' => 1420742838,
        'content-complex-viewmode-cache' => 1420742765,
        'template-block-cache' => 1420742765,
      );
      

      7. Go to admin interface and publish a new content or edit an existing one;
      8. Examine contents of expiry.php:

      $cat var/ezdemo_site/cache/expiry.php
      <?php
      $Timestamps = array (
        'class-identifier-cache' => 1420742423,
        'user-info-cache' => 1420742422,
        'image-manager-alias' => 1420742422,
        'content-tree-menu' => 1420742422,
        'active-extensions-cache' => 1420742422,
        'state-limitations' => 1417191404,
        'content-view-cache' => 1420742422,
        'global-template-block-cache' => 1420742422,
        'ts-translation-cache' => 1420742422,
        'content-complex-viewmode-cache' => 1420742867,
        'template-block-cache' => 1420742867,
      );
      

      expiry.php was reverted to its original state, which is wrong.

        Issue Links

          Activity

          Show
          Yannick Roger (Inactive) added a comment - PR by Joao: https://github.com/ezsystems/ezpublish-legacy/pull/1133
          Show
          Joao Inacio (Inactive) added a comment - Merged in ezpublish-legacy/master: https://github.com/ezsystems/ezpublish-legacy/commit/1621d93553b46514874970620122aaf3c817d9d2
          Hide
          Paulo Nunes (Inactive) added a comment -

          QA Approved
          Tested on eZ Publish 5.2, 5.3, 5.4 and master.

          Show
          Paulo Nunes (Inactive) added a comment - QA Approved Tested on eZ Publish 5.2, 5.3, 5.4 and master.
          Hide
          Paulo Nunes (Inactive) added a comment -

          QA Approved

          Show
          Paulo Nunes (Inactive) added a comment - QA Approved
          Hide
          Georg Franz added a comment -

          Hi,

          this fix will not solve the expiry-update problem in a sufficent way. I've added a detailed comment here:
          https://github.com/ezsystems/ezpublish-legacy/pull/1133

          The main problem is that a process will overwrite not changed keys of other processes because the whole variable is exported and not only the changed keys.

          So, if one process changes the user-info-cache key and the other the content view cache key, the later will overwrite the changes of the first one.

          Best wishes,
          Georg.

          Show
          Georg Franz added a comment - Hi, this fix will not solve the expiry-update problem in a sufficent way. I've added a detailed comment here: https://github.com/ezsystems/ezpublish-legacy/pull/1133 The main problem is that a process will overwrite not changed keys of other processes because the whole variable is exported and not only the changed keys. So, if one process changes the user-info-cache key and the other the content view cache key, the later will overwrite the changes of the first one. Best wishes, Georg.
          Hide
          Georg Franz added a comment -

          Hi,

          I've created another ticket for the race condition:
          https://jira.ez.no/browse/EZP-23908

          Best wishes,
          Georg.

          Show
          Georg Franz added a comment - Hi, I've created another ticket for the race condition: https://jira.ez.no/browse/EZP-23908 Best wishes, Georg.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: