You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2017/12/01 06:35:01 UTC

[jira] [Closed] (SLING-7239) LogbackManager may miss out some OSGi config at time of startup

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

Chetan Mehrotra closed SLING-7239.
----------------------------------

> LogbackManager may miss out some OSGi config at time of startup
> ---------------------------------------------------------------
>
>                 Key: SLING-7239
>                 URL: https://issues.apache.org/jira/browse/SLING-7239
>             Project: Sling
>          Issue Type: Bug
>          Components: Commons
>            Reporter: Chetan Mehrotra
>            Assignee: Chetan Mehrotra
>             Fix For: Commons Log 5.1.0
>
>
> {{LogbackManager}} currently upon construction reads all the OSGi config and configure them in Logback. Config which comes laters leads to logback reset. 
> However during the time when its getting constructed it has a logic to ignore the reset flag initialization for startup. This may lead to a race condition where some OSGi configs are picked up while it is getting constructed and some OSGi config arriving later are not picked up. For e.g.
> # LogbackManager constructor is invoked
> # It constructs LogConfigManager which registers the managed services
> # ManagedServices receive some OSGi config and push them to LogConfigManager
> # LogbackManager picks them up and add them to Logback but still startup is not finished i.e. started = true is not called
> # Some more OSGi config arrive - These would get ignored as LogbackManager#configChanged would ignore the calls because started != true
> # LogbackManager startup completes and started = true
> So here configs at #5 would not be picked up unless at #7 some more OSGi config arrive. Or some one modifies the config post system start



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)