Attila Magyar created KNOX-2978:
-----------------------------------
Summary: 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
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)