Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-6694

Meta data conversion modifies node status


    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • None
    • 5.4.6
    • None

      The conversion of the old node meta data structure to the new mixin format *in a migration context * causes the state of nodes to be modified. This prevents having the same activation states as on the initial systems.

      The flow during migration is as follows:

      • Tasks: ConvertMetaDataUpdateTask.doExcute()
      • MetaDataAsMixinConversionHelper.convertNodeAndChildren() to process node and it’s children.

      —> MgnlPropertySettingContentDecorator.ChangeLastUpdateDateOp.doExec() to add nodes to dirtyOps

      • MetaDataAsMixinConversionHelper will call the saving session for every 20 nodes:

      if (periodicSaves && nodesProcessed % PERIODIC_SAVE_FREQUENCY == 0)

      { node.getSession().save(); }

      —> MgnlPropertySettingContentDecorator. MgnlPropertySettingSessionWrapper.save()
      —> MgnlPropertySettingContentDecorator. MgnlPropertySettingSessionWrapper. applyPendingChanges()
      **The LastModified will be updated in this method by:

      if (session.nodeExists(dirty.getPath())) {
      log.debug("Updating {} with {}", dirty.getPath(), dirty.getUpdateDate());
      LastModified.update(session.getNode(dirty.getPath()), dirty.getUserName(), dirty.getUpdateDate());
      } else {
      // can happen when deleting something that was modified or moved within same session
      if (log.isDebugEnabled()) {
      log.warn("wanted to update {}:{} modified by:{} at {} but it's gone now.", session.getWorkspace().getName(), dirty.getPath(), dirty.getUserName(), dirty.getUpdateDate());

      Regarding to Jan H. the node must be unwrapped before further processing to prevent the unwanted modifications.

      See the attached patch file about how to unwrap the node.

        Acceptance criteria

              rsiska Robert Šiška
              lfischer Lars Fischer
              0 Vote for this issue
              1 Start watching this issue