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

          Kamil Madejski created issue -
          Kamil Madejski made changes -
          Field Original Value New Value
          Link This issue relates to EZP-28143 [ EZP-28143 ]
          André Rømcke made changes -
          Summary Object States Limitations should work faster Object States Limitations perform a lot of lookups
          André Rømcke made changes -
          Description The customer experienced huge load and long execution time using SearchService for content with many states. The cause of this issue is that for every element, SearchService 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.
          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.
          André Rømcke made changes -
          Status Open [ 1 ] Confirmed [ 10037 ]
          André Rømcke made changes -
          Status Confirmed [ 10037 ] Backlog [ 10000 ]
          André Rømcke made changes -
          Status Backlog [ 10000 ] Development [ 3 ]
          Assignee André Rømcke [ andre.romcke@ez.no ]
          André Rømcke made changes -
          Status Development [ 3 ] Development Review [ 10006 ]
          Show
          André Rømcke added a comment - PR: https://github.com/ezsystems/ezpublish-kernel/pull/2127
          Kamil Madejski made changes -
          Link This issue relates to CS-6432 [ CS-6432 ]
          Show
          André Rømcke added a comment - - edited Merged: https://github.com/ezsystems/ezpublish-kernel/commit/89132e701fa9da675ca7cedc4fc6f11eec76293d
          André Rømcke made changes -
          Status Development Review [ 10006 ] Documentation Review done [ 10011 ]
          Fix Version/s 1.7.6 [ 14715 ]
          Fix Version/s 5.4.11-rc [ 14716 ]
          Fix Version/s 1.12.0 [ 14839 ]
          Assignee André Rømcke [ andre.romcke@ez.no ]
          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
          André Rømcke made changes -
          Status Documentation Review done [ 10011 ] QA [ 10008 ]
          Assignee André Rømcke [ andre.romcke@ez.no ]
          André Rømcke made changes -
          Status QA [ 10008 ] InputQ [ 10001 ]
          Assignee André Rømcke [ andre.romcke@ez.no ]
          André Rømcke made changes -
          Status InputQ [ 10001 ] Development [ 3 ]
          Assignee André Rømcke [ andre.romcke@ez.no ]
          André Rømcke made changes -
          Status Development [ 3 ] Development Review [ 10006 ]
          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
          André Rømcke made changes -
          Status Development Review [ 10006 ] Documentation Review done [ 10011 ]
          Assignee André Rømcke [ andre.romcke@ez.no ]
          André Rømcke made changes -
          Fix Version/s 1.7.7 [ 14866 ]
          Fix Version/s 1.7.6 [ 14715 ]
          Gunnstein Lye made changes -
          Fix Version/s 5.4.11 [ 14717 ]
          Fix Version/s 5.4.11-rc [ 14716 ]
          Kamil Madejski made changes -
          Status Documentation Review done [ 10011 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Confirmed Confirmed
          47m 5s 1 André Rømcke 27/Oct/17 10:58 AM
          Confirmed Confirmed Backlog Backlog
          1m 26s 1 André Rømcke 27/Oct/17 10:59 AM
          Backlog Backlog Development Development
          5s 1 André Rømcke 27/Oct/17 10:59 AM
          Documentation Review done Documentation Review done QA QA
          8d 15h 52m 1 André Rømcke 08/Nov/17 3:21 PM
          QA QA InputQ InputQ
          7s 1 André Rømcke 08/Nov/17 3:21 PM
          InputQ InputQ Development Development
          6s 1 André Rømcke 08/Nov/17 3:21 PM
          Development Development Development Review Development Review
          5d 8h 15m 2 André Rømcke 13/Nov/17 11:37 PM
          Development Review Development Review Documentation Review done Documentation Review done
          5d 6h 15m 2 André Rømcke 15/Nov/17 4:24 PM
          Documentation Review done Documentation Review done Closed Closed
          397d 23h 55m 1 Kamil Madejski 18/Dec/18 4:19 PM

            People

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

              Dates

              • Created:
                Updated:
                Resolved: