You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ignite TC Bot (Jira)" <ji...@apache.org> on 2022/09/30 13:05:00 UTC

[jira] [Commented] (IGNITE-17787) Fix node failures due to CancelledKeyException

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

Ignite TC Bot commented on IGNITE-17787:
----------------------------------------

{panel:title=Branch: [pull/10279/head] Base: [master] : No blockers found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/10279/head] Base: [master] : No new tests found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}{panel}
[TeamCity *--&gt; Run :: All* Results|https://ci.ignite.apache.org/viewLog.html?buildId=6799429&amp;buildTypeId=IgniteTests24Java8_RunAll]

> Fix node failures due to CancelledKeyException
> ----------------------------------------------
>
>                 Key: IGNITE-17787
>                 URL: https://issues.apache.org/jira/browse/IGNITE-17787
>             Project: Ignite
>          Issue Type: Bug
>          Components: networking
>            Reporter: Roman Puchkovskiy
>            Assignee: Roman Puchkovskiy
>            Priority: Major
>             Fix For: 2.15
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> In GridNioServer, sessions may be moved between workers to balance the load. When a session is moved from worker A, the corresponding SelectionKey is cancelled. When a session is moved back, the selector is registered with the corresponding channel.
> Key cancellation is an async procedure. It gets really executed during selection operation (select() or selectNow()). It might happen that a session is moved from worker A (key cancellation is requested), then it gets moved back to worker A, but the worker did not have a chance to invoke select() (due to contention or some other reason). In such a case, we'll try to re-register a selector with a channel for which a key is still registered, which will cause a CancelledKeyException to be thrown (which may crash the node if a corresponding failure handler is used).
> We can fix this by invoking selectNow() just after requesting key cancellation. This will make sure the cancellation request is actually handled before the session lands to another worker.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)