[
https://issues.apache.org/jira/browse/IGNITE-11687?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexey Goncharuk updated IGNITE-11687:
--------------------------------------
Description:
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}}
was:
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.
> 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
> Priority: Major
>
> 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)