[ https://issues.apache.org/jira/browse/KNOX-2978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Attila Magyar updated KNOX-2978: -------------------------------- Fix Version/s: 2.1.0 > 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 > Fix For: 2.1.0 > > 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)