You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Stefan Egli (JIRA)" <ji...@apache.org> on 2016/03/08 11:22:40 UTC

[jira] [Resolved] (SLING-5592) rapid IdMapService activation/deactivation leaves background thread in limbo

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

Stefan Egli resolved SLING-5592.
--------------------------------
    Resolution: Fixed

> rapid IdMapService activation/deactivation leaves background thread in limbo
> ----------------------------------------------------------------------------
>
>                 Key: SLING-5592
>                 URL: https://issues.apache.org/jira/browse/SLING-5592
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: Discovery Commons 1.0.10
>            Reporter: Stefan Egli
>            Assignee: Stefan Egli
>            Priority: Minor
>             Fix For: Discovery Commons 1.0.12
>
>
> IdMapService.activate starts a background thread that reads oak's discovery-lite descriptor to find the own ('{{me}}') id assigned, to then add a corresponding mapping of {{slingId -> discovery-lite id}} under {{/var/discovery/oak/idMap}}. After that's done, the background thread stops - but until that's not done, the thread retries every second (since the discovery-lite descriptor might require some time to be available).
> Consider a scenario where the IdMapService is activated then immediately deactivated again. Although unlikely, this might happen. 
> The IdMapService will then have the 'slingSettings' removed ({{null}}) thus leading to a cascade of errors every second:
> {noformat}
> 07.03.2016 14:14:23.069 *ERROR* [IdMapService-initializer] org.apache.sling.discovery.commons.providers.spi.base.IdMapService initializer: could not init due to java.lang.NullPointerException
> java.lang.NullPointerException: null
>         at org.apache.sling.discovery.commons.providers.spi.base.IdMapService.init(IdMapService.java:187)
>         at org.apache.sling.discovery.commons.providers.spi.base.IdMapService.access$000(IdMapService.java:59)
>         at org.apache.sling.discovery.commons.providers.spi.base.IdMapService$1.check(IdMapService.java:108)
>         at org.apache.sling.discovery.commons.providers.spi.base.AbstractServiceWithBackgroundCheck$BackgroundCheckRunnable.run(AbstractServiceWithBackgroundCheck.java:77)
>         at java.lang.Thread.run(Thread.java:745)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)