[ 
https://issues.apache.org/jira/browse/KNOX-2978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17780277#comment-17780277
 ] 

ASF subversion and git services commented on KNOX-2978:
-------------------------------------------------------

Commit bc4d5486bb1b60728a1c6376336a13c627c5aa5b in knox's branch 
refs/heads/master from Attila Magyar
[ https://gitbox.apache.org/repos/asf?p=knox.git;h=bc4d5486b ]

KNOX-2978 - Race condition between Service Discovery and Polling Config 
Analyzer (#811)



> 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)

Reply via email to