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

Denis Chudov commented on IGNITE-23352:
---------------------------------------

Fixed by IGNITE-23536 on publisher/subscription side.

Requests and publisher#onClose() are now linearized with synchronization future.

> Eliminate races with storage cursors while handling replica messages
> --------------------------------------------------------------------
>
>                 Key: IGNITE-23352
>                 URL: https://issues.apache.org/jira/browse/IGNITE-23352
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Denis Chudov
>            Priority: Major
>              Labels: ignite-3
>
> *Motivation*
> Storage cursors are not thread safe by design. Meanwhile, some code in 
> PartitionReplicaListener is written without awareness of that. For example, 
> cursor can be closed by scan close request while it's still in use by another 
> thread in a handler of retrieve batch request.
> This can be solved, for example, by wrapping storage cursors with thread-safe 
> decorator.
> *Definition of done*
> There are no possible races related to storage cursors in 
> PartitionReplicaListener.
> *Implementation notes*
> It would be nice also to improve 
> PartitionScanPublisher.PartitionScanSubscription#scanBatch: it should check 
> #canceled flag on receiving retrieve batch response. Current implementation 
> is correct but no actions are actually needed afte cancellation so they can 
> be skipped.



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

Reply via email to