You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Joerg Hoh (Jira)" <ji...@apache.org> on 2022/09/29 07:34:00 UTC

[jira] [Closed] (SLING-11317) Rewriter configuration gets "lost" in ProcessorManagerImpl when package with another configuration gets deployed

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

Joerg Hoh closed SLING-11317.
-----------------------------

> Rewriter configuration gets "lost" in ProcessorManagerImpl when package with another configuration gets deployed
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-11317
>                 URL: https://issues.apache.org/jira/browse/SLING-11317
>             Project: Sling
>          Issue Type: Bug
>            Reporter: Martin Schulze
>            Assignee: Konrad Windszus
>            Priority: Major
>             Fix For: Rewriter 1.3.4
>
>          Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> On our AEM 6.5 instance (org.apache.sling.rewriter-1.2.2, but nothing major happened with this class since this version) we have multiple rewriter configurations and sometimes after a deployment of another package with a rewriter configuration, a configurations is not triggered anymore and the instance has to be restarted to get it working again.
> I've tracked the issue down and found the issue lies in the {{ProcessorManagerImpl}} [0]. There are two fields, {{processors}} and {{orderedProcessor}}, which are supposed to be mostly (inactive configs are not in the {{orderedProcessors}}) "in sync", which is important because later on there is an {{updateProcessor}} method [2], where the updated config has to be found in the {{processors}} field, but they diverge from the start, in the addProcessor [1] method, the added config never reaches the {{processors}} field, because the newConfigs local variable never gets added to the processors field. This lead to the issue, that in the updateProcessor method, which gets triggered through the ResourceChangeListener, a configuration gets wrongfully deleted [3].
> [0] https://github.com/apache/sling-org-apache-sling-rewriter/blob/master/src/main/java/org/apache/sling/rewriter/impl/ProcessorManagerImpl.java
> [1] https://github.com/apache/sling-org-apache-sling-rewriter/blob/master/src/main/java/org/apache/sling/rewriter/impl/ProcessorManagerImpl.java#L240
> [2] https://github.com/apache/sling-org-apache-sling-rewriter/blob/master/src/main/java/org/apache/sling/rewriter/impl/ProcessorManagerImpl.java#L299
> [3] https://github.com/apache/sling-org-apache-sling-rewriter/blob/master/src/main/java/org/apache/sling/rewriter/impl/ProcessorManagerImpl.java#L378



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