-
Type: Epic
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 10.10
-
Fix Version/s: 10.10-HF19, 11.1, 2021.0
-
Component/s: Events / Works
-
Tags:
-
Backlog priority:500
-
Team(s):PLATFORM
-
Completion Level (0 to 5):5
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.
- is duplicated by
-
NXP-25324 Replace remaining uses of WorkManager#listWorkIds
- Resolved