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

Background servlets: potential job storage path conflicts in clustered environments

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Background Servlets 1.0.0
    • Fix Version/s: Background Servlets 1.0.2
    • Component/s: Extensions
    • Labels:
      None

      Description

      The background servlet creates stream nodes under a configurable path with a local counter. When running in a cluster, it may happen that background servlets on multiple cluster nodes try to create the same stream node.

      java.lang.IllegalArgumentException: Stream node already exists: /var/bg/jobs/2015/07/17/15/51/82/stream
      	at org.apache.sling.bgservlets.impl.storage.JobDataImpl.getOutputStream(JobDataImpl.java:74)
      	at org.apache.sling.bgservlets.impl.BackgroundRequestExecutionJob.<init>
      

      It would probably be good to include the slingId in the path prefix to separate streams from different cluster nodes. A similar approach is implemented already for sling jobs.

        Attachments

          Activity

            People

            • Assignee:
              bdelacretaz Bertrand Delacretaz
              Reporter:
              mreutegg Marcel Reutegger
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: