[
https://issues.apache.org/jira/browse/IGNITE-8203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16520306#comment-16520306
]
Aleksey Plekhanov commented on IGNITE-8203:
-------------------------------------------
[~agoncharuk] I have made changes according to your proposal. Now init, read
and write operations are atomic.
{{write}} method acquires readLock, so failover routine for {{write}} and
{{read}} methods are differ.
In addition to {{ClosedByInterruptException}} another thread can also get
{{ClosedChannelException}} if work with the same channel at the same time. So I
added {{FileIO}} reinit routine for all kinds of {{ClosedChannelException}}. In
case when channel closed excplicitly, field {{fileIO}} will be null and
{{FileIO}} will not be reinited.
In some cases visibility of {{fileIO}} field now not guarded by {{inited}}
volatile field, as it was before, so I have made {{fileIO}} field volitile too.
TC passed, please have a look again.
> Interrupting task can cause node fail with PersistenceStorageIOException.
> --------------------------------------------------------------------------
>
> Key: IGNITE-8203
> URL: https://issues.apache.org/jira/browse/IGNITE-8203
> Project: Ignite
> Issue Type: Bug
> Components: persistence
> Affects Versions: 2.4
> Reporter: Ivan Daschinskiy
> Assignee: Aleksey Plekhanov
> Priority: Major
> Fix For: 2.6
>
> Attachments: GridFailNodesOnCanceledTaskTest.java
>
>
> Interrupting task with simple cache operations (i.e. get, put) can cause
> PersistenceStorageIOException. Main cause of this failure is lack of proper
> handling InterruptedException in FilePageStore.init() etc. This cause a throw
> of ClosedByInterruptException by FileChannel.write() and so on.
> PersistenceStorageIOException is a critical failure and typically makes a
> node to stop. As a workaround, I would suggest to enable AsyncFileIO by
> default until the fix was available.
> A reproducer is attached.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)