Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-11483

NodePropertiesVisitor causing session writes on set properties without changed properties

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Repoinit JCR 1.1.40
    • Repoinit JCR 1.1.42
    • Repoinit
    • None

    Description

      Executing Repoinit twice without contradicting statements should cause no writes, so the session returned by the visitors should return false for session.hasPendingChanges()
      The way the NodePropertiesVisitor is implemented the properties are always written if this is no defaults statement. While this satisfies the contract that for "default" there should be no writes in case properties are already present it does even cause a write in case there are no changes what so ever. The behavior of JCR is that in case the same properties are written this is equivalent to a touch (and would likely update the last modified field, although not verified) Adding a comparison for the set scenario to avoid writting properties if the target state already matches the definition eliminates the false change indicator.

      Attachments

        Activity

          People

            jsedding Julian Sedding
            dsuess Dominik Süß
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h