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

Sling Job implementation should avoid unnecessary writes to the repository

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Event 4.2.2
    • Event 4.2.4
    • Event
    • None

    Description

      I found in a number of occurences in the Sling Event code this pattern:

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

      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.

      Attachments

        Activity

          People

            cziegeler Carsten Ziegeler
            joerghoh Joerg Hoh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: