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

Replace remaining uses of WorkManager#listWorkIds

    Details

      Description

      The method WorkManager#listWorkIds is still used in legacy code.
      The code needs to be adapted.

      These cases are pretty much similar (except for the unit test NXP-28159):

      • works with the same id or same prefix are scheduled for a document (multiple renditions for a blob or rendition for multiple blobs)
      • there is an extra final action to run once all the works are done, like fires an event

      Today each Work tries to detect if it is the last one using the listWorkIds and if it is the case execute the final action.

      This logic does not scale and can fail in case of race condition:

      • it is possible that no final action is run when the 2 last works terminate at the same time (each Work sees the other work as running).
      • It is also possible to have duplicate events because the list of work is not atomically done.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                bdelbosc Benoit Delbosc
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  PagerDuty

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.