[
https://issues.apache.org/jira/browse/UNOMI-572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18095512#comment-18095512
]
Serge Huber commented on UNOMI-572:
-----------------------------------
h2. Re-targeted to unomi-3.2.0
Moved fixVersion from {{unomi-3.1.0}} to {{unomi-3.2.0}}.
When {{org.apache.unomi.services}} configuration is edited at runtime, the
{{SchedulerService}} bundle restarts and timers registered by *other* bundles
(e.g. JSON Schema reload) are lost. UNOMI-939
([#792](https://github.com/apache/unomi/pull/792)) fixed scheduler
*correctness* (locks, recovery, shutdown) but not this *architectural*
re-registration problem.
Fix needs a lifecycle/event contract so all bundles re-register tasks after
scheduler restart — too invasive for 3.1.0 GA.
h2. Workaround for 3.1
Avoid hot-reloading {{org.apache.unomi.services.cfg}} in production. After
config changes that restart the services bundle, perform a full Karaf/Unomi
restart so scheduled tasks re-register.
> Design issue with SchedulerService and conf reloading.
> ------------------------------------------------------
>
> Key: UNOMI-572
> URL: https://issues.apache.org/jira/browse/UNOMI-572
> Project: Apache Unomi
> Issue Type: Bug
> Affects Versions: unomi-2.0.0, unomi-1.6.0
> Reporter: Kevan Jahanshahi
> Priority: Major
> Fix For: unomi-3.2.0
>
>
> The SchedulerService implementation is part of the *unomi-services* bundle,
> so in case somebody is editing a configuration file like this one:
> {code:java}
> org.apache.unomi.services {code}
> The SchedulerService will be restarted, and some tasks/timers will be lost
> during the process, because not all tasks/timers are coming from the
> *unomi-services* bundle.
> There is other bundles that would need to be notify about that restart to be
> able to re-register their tasks and timers.
> Currently those tasks/timers coming from other bundles are lost, and this is
> causing major Unomi runtime instabilities.
> For exemple: Recently we added a JSON Schema service that have a task to
> reload schemas from ES directly into RAM. This task is lost in case of conf
> editing on the mentioned conf, making JSON Schemas not reloaded anymore.
> *Additional info: during the correction of this issue, please look for todos
> in unomi code that mention: UNOMI-572 they will probably need to be fixed at
> the same time.*
--
This message was sent by Atlassian Jira
(v8.20.10#820010)