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

            Hide
            kleturc Kevin Leturc added a comment -

            Put back in 10.3.9 as it's just fixing two review comments.

            Show
            kleturc Kevin Leturc added a comment - Put back in 10.3.9 as it's just fixing two review comments.
            Hide
            hudson Jenkins added a comment -

            SUCCESS: Integrated in master/nuxeo-master #2044
            NXP-25761: Cleanup / Format (kevinleturc: 5569c5e450f3bdd23f510bf7b411112b3c17d51e)
            NXP-25761: Fix trash migration (kevinleturc: 074f3269489d72728fef436b81dd449cee3530ae)
            NXP-25761 NXP-22532: Make LifeCycleService a real service and deprecate (kevinleturc: f3d18c6da0a1b91b7ffcbba8fc7ac778b7862ab6)
            NXP-25761: Don't follow delete transitions anymore but trash document (kevinleturc: 9624d94a19b78c6813c7b68fde508ba025df7ee4)
            NXP-25761: Deprecate 'deleted' state (kevinleturc: 418cd15cb00bd6268d6279ac06fce29eb195f6cf)

            Show
            hudson Jenkins added a comment - SUCCESS: Integrated in master/nuxeo-master #2044 NXP-25761 : Cleanup / Format (kevinleturc: 5569c5e450f3bdd23f510bf7b411112b3c17d51e ) NXP-25761 : Fix trash migration (kevinleturc: 074f3269489d72728fef436b81dd449cee3530ae ) NXP-25761 NXP-22532 : Make LifeCycleService a real service and deprecate (kevinleturc: f3d18c6da0a1b91b7ffcbba8fc7ac778b7862ab6 ) NXP-25761 : Don't follow delete transitions anymore but trash document (kevinleturc: 9624d94a19b78c6813c7b68fde508ba025df7ee4 ) NXP-25761 : Deprecate 'deleted' state (kevinleturc: 418cd15cb00bd6268d6279ac06fce29eb195f6cf )
            Hide
            hudson Jenkins added a comment -

            SUCCESS: Integrated in master/addons_nuxeo-template-rendering-master #1075
            NXP-25761: Don't follow delete transitions anymore but trash document (kevinleturc: c2c89515f15622f71516e4b353c9e2b00bea85a3)

            Show
            hudson Jenkins added a comment - SUCCESS: Integrated in master/addons_nuxeo-template-rendering-master #1075 NXP-25761 : Don't follow delete transitions anymore but trash document (kevinleturc: c2c89515f15622f71516e4b353c9e2b00bea85a3 )
            Hide
            hudson Jenkins added a comment -

            SUCCESS: Integrated in master/nuxeo-master #2351
            NXP-25761: Don't follow delete transitions anymore but trash document (kevinleturc: c2c89515f15622f71516e4b353c9e2b00bea85a3)

            Show
            hudson Jenkins added a comment - SUCCESS: Integrated in master/nuxeo-master #2351 NXP-25761 : Don't follow delete transitions anymore but trash document (kevinleturc: c2c89515f15622f71516e4b353c9e2b00bea85a3 )
            Hide
            hudson Jenkins added a comment -

            SUCCESS: Integrated in 10.10/nuxeo-10.10 #92
            NXP-25761: Don't follow delete transitions anymore but trash document (kevinleturc: c2c89515f15622f71516e4b353c9e2b00bea85a3)

            Show
            hudson Jenkins added a comment - SUCCESS: Integrated in 10.10/nuxeo-10.10 #92 NXP-25761 : Don't follow delete transitions anymore but trash document (kevinleturc: c2c89515f15622f71516e4b353c9e2b00bea85a3 )

              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