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

Dominik Süß updated SLING-11483:
--------------------------------
    Affects Version/s: Repoinit JCR 1.1.40

> 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üß
>            Priority: Major
>          Time Spent: 10m
>  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)

Reply via email to