[
https://issues.apache.org/jira/browse/IGNITE-26315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kirill Tkalenko updated IGNITE-26315:
-------------------------------------
Description:
It was found that there is a possible race between increasing the partition
generation (destroying it) and writing to it. At the time of writing to it, we
can see the old generation of the partition, and when directly writing a dirty
page, we find that the generation of the partition has changed and we should
skip this dirty page, but instead we try to write it and get an error something
like the one below.
This problem can currently be solved by adding synchronization between
increasing the partition generation and performing write operations to it. So
that writes to the partition strictly see one generation of the partition while
it is being performed.
{noformat}
[12:11:58]W: [:ignite-sql-engine:integrationTest] Caused by:
java.lang.IllegalArgumentException: Negative position
[12:11:58]W: [:ignite-sql-engine:integrationTest] at
java.base/sun.nio.ch.SimpleAsynchronousFileChannelImpl.implWrite(SimpleAsynchronousFileChannelImpl.java:350)
[12:11:58]W: [:ignite-sql-engine:integrationTest] at
java.base/sun.nio.ch.AsynchronousFileChannelImpl.write(AsynchronousFileChannelImpl.java:251)
[12:11:58]W: [:ignite-sql-engine:integrationTest] at
org.apache.ignite.internal.fileio.AsyncFileIo.write(AsyncFileIo.java:121)
[12:11:58]W: [:ignite-sql-engine:integrationTest] at
org.apache.ignite.internal.fileio.AbstractFileIo.lambda$writeFully$4(AbstractFileIo.java:58)
[12:11:58]W: [:ignite-sql-engine:integrationTest] at
org.apache.ignite.internal.fileio.AbstractFileIo.fully(AbstractFileIo.java:107)
[12:11:58]W: [:ignite-sql-engine:integrationTest] at
org.apache.ignite.internal.fileio.AbstractFileIo.writeFully(AbstractFileIo.java:58)
[12:11:58]W: [:ignite-sql-engine:integrationTest] at
org.apache.ignite.internal.pagememory.persistence.store.AbstractFilePageStoreIo.write(AbstractFilePageStoreIo.java:190)
[12:11:58]W: [:ignite-sql-engine:integrationTest] at
org.apache.ignite.internal.pagememory.persistence.checkpoint.CheckpointManager.writePageToFilePageStore(CheckpointManager.java:352)
[12:11:58]W: [:ignite-sql-engine:integrationTest] at
org.apache.ignite.internal.pagememory.persistence.checkpoint.CheckpointPagesWriter.writePartitionMeta(CheckpointPagesWriter.java:424)
[12:11:58]W: [:ignite-sql-engine:integrationTest] at
org.apache.ignite.internal.pagememory.persistence.checkpoint.CheckpointPagesWriter.writeDirtyPages(CheckpointPagesWriter.java:219)
[12:11:58]W: [:ignite-sql-engine:integrationTest] at
org.apache.ignite.internal.pagememory.persistence.checkpoint.CheckpointPagesWriter.run(CheckpointPagesWriter.java:181)
[12:11:58]W: [:ignite-sql-engine:integrationTest] ... 3 more
{noformat}
was:Need to sort out partition deletion blocking when working with
checkpoint, there may be some more actions than necessary now.
> Fix race between increasing partition generation and performing write
> operations to it
> --------------------------------------------------------------------------------------
>
> Key: IGNITE-26315
> URL: https://issues.apache.org/jira/browse/IGNITE-26315
> Project: Ignite
> Issue Type: Bug
> Reporter: Kirill Tkalenko
> Assignee: Kirill Tkalenko
> Priority: Major
> Labels: ignite-3
> Time Spent: 10m
> Remaining Estimate: 0h
>
> It was found that there is a possible race between increasing the partition
> generation (destroying it) and writing to it. At the time of writing to it,
> we can see the old generation of the partition, and when directly writing a
> dirty page, we find that the generation of the partition has changed and we
> should skip this dirty page, but instead we try to write it and get an error
> something like the one below.
> This problem can currently be solved by adding synchronization between
> increasing the partition generation and performing write operations to it. So
> that writes to the partition strictly see one generation of the partition
> while it is being performed.
> {noformat}
> [12:11:58]W: [:ignite-sql-engine:integrationTest] Caused by:
> java.lang.IllegalArgumentException: Negative position
> [12:11:58]W: [:ignite-sql-engine:integrationTest] at
> java.base/sun.nio.ch.SimpleAsynchronousFileChannelImpl.implWrite(SimpleAsynchronousFileChannelImpl.java:350)
> [12:11:58]W: [:ignite-sql-engine:integrationTest] at
> java.base/sun.nio.ch.AsynchronousFileChannelImpl.write(AsynchronousFileChannelImpl.java:251)
> [12:11:58]W: [:ignite-sql-engine:integrationTest] at
> org.apache.ignite.internal.fileio.AsyncFileIo.write(AsyncFileIo.java:121)
> [12:11:58]W: [:ignite-sql-engine:integrationTest] at
> org.apache.ignite.internal.fileio.AbstractFileIo.lambda$writeFully$4(AbstractFileIo.java:58)
> [12:11:58]W: [:ignite-sql-engine:integrationTest] at
> org.apache.ignite.internal.fileio.AbstractFileIo.fully(AbstractFileIo.java:107)
> [12:11:58]W: [:ignite-sql-engine:integrationTest] at
> org.apache.ignite.internal.fileio.AbstractFileIo.writeFully(AbstractFileIo.java:58)
> [12:11:58]W: [:ignite-sql-engine:integrationTest] at
> org.apache.ignite.internal.pagememory.persistence.store.AbstractFilePageStoreIo.write(AbstractFilePageStoreIo.java:190)
> [12:11:58]W: [:ignite-sql-engine:integrationTest] at
> org.apache.ignite.internal.pagememory.persistence.checkpoint.CheckpointManager.writePageToFilePageStore(CheckpointManager.java:352)
> [12:11:58]W: [:ignite-sql-engine:integrationTest] at
> org.apache.ignite.internal.pagememory.persistence.checkpoint.CheckpointPagesWriter.writePartitionMeta(CheckpointPagesWriter.java:424)
> [12:11:58]W: [:ignite-sql-engine:integrationTest] at
> org.apache.ignite.internal.pagememory.persistence.checkpoint.CheckpointPagesWriter.writeDirtyPages(CheckpointPagesWriter.java:219)
> [12:11:58]W: [:ignite-sql-engine:integrationTest] at
> org.apache.ignite.internal.pagememory.persistence.checkpoint.CheckpointPagesWriter.run(CheckpointPagesWriter.java:181)
> [12:11:58]W: [:ignite-sql-engine:integrationTest] ... 3 more
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)