Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-32817

Fix infinite loop if the results count of a page provider changes while running RunOperationOnProvider operation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2023.0
    • Fix Version/s: 2025.x, 2023.17
    • Component/s: Automation
    • Backlog priority:
      800
    • Team:
      PLATFORM
    • Sprint:
      nxplatform #119
    • Story Points:
      3

      Description

      The operation RunOperationOnProvider allows to run an Automation operation against the results (current page) of a page provider.

      The bug lies into the fact that the operation (or a listener) can change a metadata tested by the page provider, and therefore the results count will change.

      However the initial results count is compared with the current results count to decide if we continue with the next page. If this equality is not satisfied, then the code ends with an infinite loop

      https://github.com/nuxeo/nuxeo/blob/2023/modules/platform/nuxeo-automation/nuxeo-automation-features/src/main/java/org/nuxeo/ecm/automation/core/operations/services/RunOperationOnProvider.java#L74

      Expected behavior: It's fine to detect that the results count has changed but it would end with a warn printed to the logs or with an error thrown to the caller if this case should never happen

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: