You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Timothee Maret (Jira)" <ji...@apache.org> on 2020/01/28 12:21:00 UTC

[jira] [Comment Edited] (SLING-9030) SimpleDistributionAgentQueueProcessor does not distinguish between recoverable and non-recoverable exceptions

    [ https://issues.apache.org/jira/browse/SLING-9030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17025069#comment-17025069 ] 

Timothee Maret edited comment on SLING-9030 at 1/28/20 12:20 PM:
-----------------------------------------------------------------

bq. Perhaps the logging can be less verbose and can be logged at WARN level for RecoverableDistributionException.

+1, thanks [~ashishc] and [~mohiaror]. Would you open a PR that changes the level ?


was (Author: marett):
bq. Perhaps the logging can be less verbose and can be logged at WARN level for RecoverableDistributionException.

+1, thanks [~ashishc]. Would you open a PR that changes the level ?

> SimpleDistributionAgentQueueProcessor does not distinguish between recoverable and non-recoverable exceptions
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-9030
>                 URL: https://issues.apache.org/jira/browse/SLING-9030
>             Project: Sling
>          Issue Type: Bug
>          Components: Content Distribution
>            Reporter: Mohit Arora
>            Assignee: Timothee Maret
>            Priority: Major
>             Fix For: Content Distribution Core 0.4.2
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> [SimpleDistributionAgentQueueProcessor.java|https://github.com/apache/sling-org-apache-sling-distribution-core/blob/master/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentQueueProcessor.java#L83] is responsible for processing a queueItem which is then passed on to [RemoteDistributionPackageImporter#importPackage()|https://github.com/apache/sling-org-apache-sling-distribution-core/blob/master/src/main/java/org/apache/sling/distribution/packaging/impl/importer/RemoteDistributionPackageImporter.java#L59] which in turn selects a valid transporter and send the POST request through [SimpleHttpDistributionTransport#deliverPackage()|https://github.com/apache/sling-org-apache-sling-distribution-core/blob/master/src/main/java/org/apache/sling/distribution/transport/impl/SimpleHttpDistributionTransport.java#L108]. There can be 2 types of exceptions thrown by this deliverPackage() function. One is a [RecoverableDistributionException|https://github.com/apache/sling-org-apache-sling-distribution-core/blob/master/src/main/java/org/apache/sling/distribution/common/RecoverableDistributionException.java] which is a type of DistributionException and another is DistributionException. As the name suggests, a RecoverableDistributionException is where the transport is tried again. But it seems there is currently no cap on the number of retries.
> For example, if the endpoint is not accessible at the moment, the error logs of the caller application will be flooded with constant retries of the DistributionPackages in queue, until the endpoint comes up and the distribution is successful. The reason being, [the verbose logging done here|https://github.com/apache/sling-org-apache-sling-distribution-core/blob/master/src/main/java/org/apache/sling/distribution/agent/impl/SimpleDistributionAgentQueueProcessor.java#L151]. This would lead to sharp increase in disk size of the caller application. Perhaps the logging can be less verbose and can be logged at *WARN* level for RecoverableDistributionException.
> cc - [~ashishc], [~marett]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)