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

expiry.php race condition

    XMLWordPrintable

    Details

      Description

      Hi,

      this is a follow up of EZP-23870
      https://github.com/ezsystems/ezpublish-legacy/pull/1133

      If two processes were started at the same time and if they read the same expiry.php, the process which will be ended last will overwrite the changes of the earlier process.

      Example:
      User A is updating the user cache
      User B is moving a tree

      Both processes read the same expiry.

      Process A writes the user-info-cache key
      Process B writes the view cache key and the template block key

      Process B is reverting the changes of Process A because the expiry.php isn't reloaded before it's written.

      Suggestion:
      a) Reload the expiry.php before it's written
      b) Only update the changed keys and only update the keys if they are older than the current one.

      The first solution will be only reloading the expiry.php before it's written.

      The longtime solution should be: Doing a "expiry.php" queue like the async. So, every update request should be written in a db table and a daemon is updating the expiry.php every x seconds - if there are changes.

      Best wishes,
      Georg.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                emil.webber Georg Franz
              • Votes:
                0 Vote for this issue
                Watchers:
                6 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 - 6 hours, 30 minutes
                  6h 30m