Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-3501

When cancelling an update modcount of modified states must be reset

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 0.9, 2.4.4, 2.6
    • None
    • None

    Description

      The overlayed states are touched when beginning an update, but when an update is cancelled they are never untouched again. A subsequent external change to the same state is not merged correctly because the item will not appear stale.

      The problem causes data inconsistencies in the following example scenario:

      remote.getNode("/test").addNode("a");
      remote.save();
      local.getNode("/test").addNode("b");
      local.save();
      local.getNode("/test").getNode("a").addNode("c");
      local.save();
      remote.getNode("/test").getNode("a").remove();
      final Node d = local.getNode("/test").addNode("d");
      try {
      remote.save(); // fails, but cancelling update leaves SISM in bad state
      } catch (Exception e) {
      remote.refresh(false);
      }
      remote.getNode("/test").addNode("e");
      local.save();
      remote.save(); // succeeds but leaves repository inconsistencies

      Attachments

        Activity

          People

            unico@apache.org Unico Hommes
            unico@apache.org Unico Hommes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: