[
https://issues.apache.org/jira/browse/KNOX-2978?focusedWorklogId=887519&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-887519
]
ASF GitHub Bot logged work on KNOX-2978:
----------------------------------------
Author: ASF GitHub Bot
Created on: 27/Oct/23 09:21
Start Date: 27/Oct/23 09:21
Worklog Time Spent: 10m
Work Description: zeroflag merged PR #811:
URL: https://github.com/apache/knox/pull/811
Issue Time Tracking
-------------------
Worklog Id: (was: 887519)
Time Spent: 20m (was: 10m)
> Race condition between Service Discovery and Polling Config Analyzer
> --------------------------------------------------------------------
>
> Key: KNOX-2978
> URL: https://issues.apache.org/jira/browse/KNOX-2978
> Project: Apache Knox
> Issue Type: Improvement
> Reporter: Attila Magyar
> Assignee: Attila Magyar
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> When a config change is detected by the Polling Config Analyzer then then the
> cache used by the service discovery will be cleared. If this happens when
> discovery is in progress then a NullPointerException will happen.
> {code}
> private ServiceDetails getServiceDetails(ServiceDiscoveryConfig
> serviceDiscoveryConfig, ApiService service) {
> return getClusterServices(serviceDiscoveryConfig).getIfPresent(service);
> // <= NPE
> }
> {code}
> {code}
> @Override
> public void onConfigurationChange(String source, String clusterName) {
> log.clearServiceDiscoveryRepository();
> repository.clear(); // this will cause the NPE
> }
> {code}
> This was observed on a live cluster when certain cluster properties was
> changed during knox startup.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)