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

Rework async binary metadata process

    XMLWordPrintable

    Details

    • Release Notes Summary:
      The binary metadata synchronization can now work asynchronously.
    • Backlog priority:
      700
    • Sprint:
      nxplatform #49, nxplatform #50
    • Story Points:
      2

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h