[ 
https://issues.apache.org/jira/browse/SLING-12436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christian Schneider updated SLING-12436:
----------------------------------------
    Description: 
org.apache.sling.distribution.journal.impl.discovery.DiscoveryService is 
configured to be called by sling scheduler every 5 seconds.

 
{noformat}
// 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);{noformat}
 

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
h3.  

  was:
org.apache.sling.distribution.journal.impl.discovery.DiscoveryService is 
configured to be called by sling scheduler every 5 seconds.
{code:java}
// 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); {code}
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
h3.


> Change scheduler setup in distribution journal to be more resilient
> -------------------------------------------------------------------
>
>                 Key: SLING-12436
>                 URL: https://issues.apache.org/jira/browse/SLING-12436
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Christian Schneider
>            Priority: Major
>
> org.apache.sling.distribution.journal.impl.discovery.DiscoveryService is 
> configured to be called by sling scheduler every 5 seconds.
>  
> {noformat}
> // 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);{noformat}
>  
> 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
> h3.  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to