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

Concurrency issue can prevent repository packages to be cleaned up

    XMLWordPrintableJSON

Details

    • Patch

    Description

      In SCD setups with more than one export queue and storing packages in the repository, packages may not be collected after being distributed to all queues.

      This is typically the case on the author instance of a Sync setup.

      The current implementation [0] stores a resource in the repository in order to keep track of each consumer of the package. When each consumer is done distributing to its queue, it checks if there is no more registered resources and remove the package if it is the case.

      The problem is that consumers run concurrently and without synchronisation, thus leading to situation where all consumers concurrently observe remaining consumers and the cleanup is never executed.

      [0] https://github.com/apache/sling/blob/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/packaging/impl/ResourceDistributionPackage.java

      Attachments

        1. SLING-6503.patch
          23 kB
          Timothee Maret

        Issue Links

          Activity

            People

              marett Timothee Maret
              marett Timothee Maret
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: