ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrey Gura (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (IGNITE-11687) Concurrent WAL replay & log may fail with CRC error on read
Date Fri, 05 Apr 2019 16:39:00 GMT

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

Andrey Gura edited comment on IGNITE-11687 at 4/5/19 4:38 PM:
--------------------------------------------------------------

[~agoncharuk] You are right. It could be fixed easy. {{FileHandleManagerImpl.WALWriter#writeBuffer}}
method has only one usage so it can just return delta that must be added to the {{hnd.written}}.


was (Author: agura):
[~agoncharuk] You are right. It could be fixed easy. {{FileHandleManagerImpl.WALWriter#writeBuffer}}
method has only one usage so it can just return delta that must be added to the {{hnd.written}.}

> Concurrent WAL replay & log may fail with CRC error on read
> -----------------------------------------------------------
>
>                 Key: IGNITE-11687
>                 URL: https://issues.apache.org/jira/browse/IGNITE-11687
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Alexey Goncharuk
>            Assignee: Andrey Gura
>            Priority: Critical
>             Fix For: 2.8
>
>
> The cause is the way {{end}} is calculated for WAL iterator:
> {code}
> if (hnd != null)
>     end = hnd.position();
> {code}
> {code}
>     @Override public FileWALPointer position() {
>         lock.lock();
>         try {
>             return new FileWALPointer(getSegmentId(), (int)written, 0);
>         }
>         finally {
>             lock.unlock();
>         }
>     }
> {code}
> Consider a partially written entry. In this case, {{written}} has been already updated,
concurrent WAL replay will attempt to read the incompletely written record and since {{end}}
is not null, iterator will fail with CRC error.
> The issue may be rarely reproduced by {{IgniteWalSerializerVersionTest}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message