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

Change scheduler setup in distribution journal to be more resilient

    XMLWordPrintableJSON

Details

    Description

      org.apache.sling.distribution.journal.impl.discovery.DiscoveryService is configured to be called by sling scheduler every 5 seconds.

       

      // Register periodic task to update the topology view        
      Dictionary<String, Object> props = new Hashtable<>();        
      props.put(PROPERTY_SCHEDULER_CONCURRENT, false);        
      props.put(PROPERTY_SCHEDULER_PERIOD, 5L); // every 5 seconds     
      reg = context.registerService(Runnable.class.getName(), this, props);

       

      This makes sling scheduler use the default thread pool. At a customer we had some other job block all threads of default thread pool. This caused our code here to not be called anymore and thus the UI of content distribution showed no progress in replication queues. For customers this looked like replication stopped working.

      We should set a specific thread pool for distribution to make sure we are not affected by other code using sling scheduler.

       

      Apart from this we should also setup the same for ResourceDistributionPackageCleanup

       

      Attachments

        Activity

          People

            cschneider Christian Schneider
            cschneider Christian Schneider
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: