Jörg Hoh created SLING-6782:
-------------------------------

             Summary: Sling Job implementation should avoid unnecessary writes 
to the repository
                 Key: SLING-6782
                 URL: https://issues.apache.org/jira/browse/SLING-6782
             Project: Sling
          Issue Type: Improvement
          Components: Event
    Affects Versions: Event 4.2.2
            Reporter: Jörg Hoh


I found in a number of occurences this pattern:

{code}
                        ResourceHelper.getOrCreateResource(resolver, newPath, 
props);
                        resolver.delete(jobResource);
                        resolver.commit();
{code}

and the getOrCreateResource is internally doing a commit on the resolver 
(autoCommit = true). So in the end there are 2 commits while only a single 
commit would be sufficient.

Removing these "double" commits could avoid a few write operations on the 
repository.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to