-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 10.1
-
Fix Version/s: 10.10-HF56, 2021.13
-
Component/s: Binary Metadata
-
Release Notes Summary:The binary metadata synchronization can now work asynchronously.
-
Tags:
-
Backlog priority:700
-
Sprint:nxplatform #49, nxplatform #50
-
Story Points:2
Binary Metadata Async
Issues
The process async was not possible to be executed in this mode for the following reasons: (the test updated was offuscating the error)
The context data and two sync listeners
The feature is:
passing context data set in a Document via a listener on beforeModification
retrieving those context data in a listener on documentModified
But
The context data is flushed by the AbstractSession#saveDocument when a read document is executed before the documentModified event fire.
So the flag is always empty or null for starting the binary metadata worker.
See for instance https://github.com/nuxeo/nuxeo-binary-metadata/commit/d93736602b048a19093da645fe5013c8ccf09325
The dirty properties
We cannot follow the rules in an async way: the properties or blob are never dirty.
Conclusion - Solution
We should:
- Keep only the first listener org.nuxeo.binary.metadata.internals.listeners.BinaryMetadataSyncListener doing all the dispatch and process.
- Execute the sync process as it is.
- Execute the async process and passing to the worker all Dirty information found on the documents to do the mapping correctly.
For documentation, should be added:
- A sequence diagram
- A rules schema