You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Eric Norman (Jira)" <ji...@apache.org> on 2022/09/23 20:52:00 UTC

[jira] [Closed] (SLING-11483) NodePropertiesVisitor causing session writes on set properties without changed properties

     [ https://issues.apache.org/jira/browse/SLING-11483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Norman closed SLING-11483.
-------------------------------

> NodePropertiesVisitor causing session writes on set properties without changed properties
> -----------------------------------------------------------------------------------------
>
>                 Key: SLING-11483
>                 URL: https://issues.apache.org/jira/browse/SLING-11483
>             Project: Sling
>          Issue Type: Bug
>          Components: Repoinit
>    Affects Versions: Repoinit JCR 1.1.40
>            Reporter: Dominik Süß
>            Assignee: Julian Sedding
>            Priority: Major
>             Fix For: Repoinit JCR 1.1.42
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)