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

Stepachev Maksim commented on IGNITE-12621:
-------------------------------------------

[~slava.koptilin] LGTM! 

> Node leave may cause NullPointerException during IO message processing if 
> security is enabled
> ---------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-12621
>                 URL: https://issues.apache.org/jira/browse/IGNITE-12621
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 2.8
>            Reporter: Vyacheslav Koptilin
>            Assignee: Vyacheslav Koptilin
>            Priority: Major
>             Fix For: 2.9
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> In case the node will receive IO message from a dead node *after* receiving 
> discovery message about node fail, {{ctx.discovery().node(uuid)}} will return 
> {{null}}, which in turn will cause {{NullPointerException}}.
> We can fix it by peeking disco cache history for retrieving attributes of the 
> dead node.
> See:
> {code}
>     /** {@inheritDoc} */
>     @Override public OperationSecurityContext withContext(UUID nodeId) {
>         return withContext(
>             secCtxs.computeIfAbsent(nodeId,
>                 uuid -> nodeSecurityContext(
>                     marsh, U.resolveClassLoader(ctx.config()), 
> ctx.discovery().node(uuid)
>                 )
>             )
>         );
>     }
> {code}
> {noformat}
> Caused by: java.lang.NullPointerException
>       at 
> org.apache.ignite.internal.processors.security.SecurityUtils.nodeSecurityContext(SecurityUtils.java:135)
>       at 
> org.apache.ignite.internal.processors.security.IgniteSecurityProcessor.lambda$withContext$0(IgniteSecurityProcessor.java:112)
>       at 
> java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
>       at 
> org.apache.ignite.internal.processors.security.IgniteSecurityProcessor.withContext(IgniteSecurityProcessor.java:111)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to