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

Object States Limitations perform a lot of lookups

    Details

      Description

      The customer experienced huge load and long execution time using API for content with many states. The cause of this issue is that for every element, canUser and getPermissionCriterion for Search service has to check if a content has the correct state (to be displayed for e.g.).

      This issue is related to the: https://jira.ez.no/browse/EZP-28143 and was discovered during the investigation of the same CS ticket.

        Issue Links

          Activity

          Hide
          André Rømcke added a comment -

          Regression fix merged and made part of micro patch for 1.7.6 and 1.12.0:
          https://github.com/ezsystems/ezpublish-kernel/commit/470b1618bdda04f1bf29b3b3b914d2911b38971f

          Show
          André Rømcke added a comment - Regression fix merged and made part of micro patch for 1.7.6 and 1.12.0: https://github.com/ezsystems/ezpublish-kernel/commit/470b1618bdda04f1bf29b3b3b914d2911b38971f
          Hide
          Gaetano Giunta added a comment - - edited

          Seems like this broke the unit tests of Kaliop Mig Bundle

          Last known good test - 8 days ago: build #515 - https://travis-ci.org/kaliop-uk/ezmigrationbundle/builds/295014875
          (it failed on php 7.2 but that's because of netgen tags bundle having changed file structure)

          First test known to fail - today: build #516 - https://travis-ci.org/kaliop-uk/ezmigrationbundle/builds/298673889

          The failure is in the test that checks management of Object states.

          The difference in between the 2 builds, on the side of the mig bundle, does not justify the new failure as it does not relate to obj states and is in fact just adding some code that was not even covered by any test (so not run as part of test suite).

          Otoh I see that the latest ezpublish-kernel was updated from 6.7.5 to 6.7.6

          In short: the failure happens when, within a migration, the code:
          1. creates an obj state group and 2 states
          2. updates the group, changing its identifier
          3. tries to reload the list of states, to assign one of the states of the that group to a content

          (see https://github.com/kaliop-uk/ezmigrationbundle/blob/master/Tests/dsl/good/UnitTestOK012_objectState.yml)

          At first sight, I would say that there is some new cache in there that does not get cleared at step 2

          Show
          Gaetano Giunta added a comment - - edited Seems like this broke the unit tests of Kaliop Mig Bundle Last known good test - 8 days ago: build #515 - https://travis-ci.org/kaliop-uk/ezmigrationbundle/builds/295014875 (it failed on php 7.2 but that's because of netgen tags bundle having changed file structure) First test known to fail - today: build #516 - https://travis-ci.org/kaliop-uk/ezmigrationbundle/builds/298673889 The failure is in the test that checks management of Object states. The difference in between the 2 builds, on the side of the mig bundle, does not justify the new failure as it does not relate to obj states and is in fact just adding some code that was not even covered by any test (so not run as part of test suite). Otoh I see that the latest ezpublish-kernel was updated from 6.7.5 to 6.7.6 In short: the failure happens when, within a migration, the code: 1. creates an obj state group and 2 states 2. updates the group, changing its identifier 3. tries to reload the list of states, to assign one of the states of the that group to a content (see https://github.com/kaliop-uk/ezmigrationbundle/blob/master/Tests/dsl/good/UnitTestOK012_objectState.yml ) At first sight, I would say that there is some new cache in there that does not get cleared at step 2
          Show
          André Rømcke added a comment - - edited Merged: https://github.com/ezsystems/ezpublish-kernel/commit/89132e701fa9da675ca7cedc4fc6f11eec76293d
          Show
          André Rømcke added a comment - PR: https://github.com/ezsystems/ezpublish-kernel/pull/2127

            People

            • Assignee:
              Unassigned
              Reporter:
              Kamil Madejski
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: