[ 
https://issues.apache.org/jira/browse/IGNITE-23105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kirill Tkalenko updated IGNITE-23105:
-------------------------------------
    Reviewer: Ivan Bessonov

> Data race in aipersist partition destruction
> --------------------------------------------
>
>                 Key: IGNITE-23105
>                 URL: https://issues.apache.org/jira/browse/IGNITE-23105
>             Project: Ignite
>          Issue Type: Bug
>          Components: persistence
>            Reporter: Ivan Bessonov
>            Assignee: Kirill Tkalenko
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.0
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> {{CheckpointProgressImpl#onStartPartitionProcessing}} and 
> {{CheckpointProgressImpl#onFinishPartitionProcessing}} don't work as intended 
> for several reasons:
>  * There's a race, we could call {{onFinish}} before {{onStart}} is called in 
> a concurrent thread. This might happen if there's only a handful of dirty 
> pages in each partition and there are more than one checkpoint threads. 
> Basically, this protection doesn't work.
>  * Even if that particular race wouldn't exits, this code still doesn't work, 
> because some of pages could be added to {{pageIdsToRetry}} map. That map will 
> be processed later, when {{writePages}} is finished, manning that we mark 
> unfinished partitions as finished.
>  * Due to aforementioned bugs, I didn't bother including these methods to 
> {{{}drainCheckpointBuffers{}}}. As a result, this method requires a fix too
> *Upd:*
> The first and second problems can be solved within the IGNITE-23115, when the 
> writing of pages of one partition is made by only one thread, it will be 
> necessary to check.
> After a thoughtful analysis, I found out that there is no race. So I renamed 
> some methods and added documentation to them. And also fix 
> *drainCheckpointBuffers*.



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

Reply via email to