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

Fix Trash migration

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.2, 10.3-SNAPSHOT
    • Fix Version/s: 10.3
    • Component/s: Core, Migration Service
    • Backlog priority:
      700
    • Upgrade notes:
      Hide

      org.nuxeo.isTrashed.from.deleteTransition introduced in 10.2 has been removed. Now, if you have migrated your Nuxeo instance to use new dedicated isTrashed property, calls to CoreSession#followTransition with delete/undelete transition are forwarded to TrashService without following the transition.
      Also, these transitions are deprecated as we DO NOT follow them anymore. As a consequence, after migration or on a fresh instance, documents can't have deleted state anymore.
      As a consequence of this backward mechanism, following these transitions on proxy will remove them.

      Show
      org.nuxeo.isTrashed.from.deleteTransition introduced in 10.2 has been removed. Now, if you have migrated your Nuxeo instance to use new dedicated isTrashed property, calls to CoreSession#followTransition with delete / undelete transition are forwarded to TrashService without following the transition. Also, these transitions are deprecated as we DO NOT follow them anymore. As a consequence, after migration or on a fresh instance, documents can't have deleted state anymore. As a consequence of this backward mechanism, following these transitions on proxy will remove them.
    • Sprint:
      nxcore 10.3.8, nxcore 10.3.9
    • Story Points:
      2

      Description

      Since NXP-24031, the trash state is now a dedicated boolean instead of the lifecycle state deleted.

      We implemented a migrator to use new service along with NXP-24035. This migrator retrieves all document whose lifecycle state is deleted and sets the trashed boolean to true.
      The migrator initially doesn't change the lifecycle state for several reasons:

      • transition to leave deleted state is not necessarily known
      • lifecycle policy can no longer exist

      Since NXP-25439, server is able to auto-detect in which case the DB is. This allows to easily switch from a former implementation to a knew one without contributing and/or restarting the server.

      As deleted state is left as it on document, server will detect DB is in former state, which can bring several issues. Especially if nodes in a HA setup don't use the same service.

      We need to fix this:

      • a simple solution could be to follow the undelete transition
      • if not possible, hardly set project state
      • also change the backward compatibilty mechanism on CoreSession#followTransition, as having documents with deleted state cause migration service to switch trash service to former one! -> change backward compatibilty mechanism to just trash document and not follow transition in such case

      Note: NXQL queries are rewritten at runtime depending on trash service state. We can choose to leave the query as is when constraints contain both lifecycle state and trashed property.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours, 50 minutes
                  3h 50m

                    PagerDuty

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