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

Maksim Zhuravkov updated IGNITE-24017:
--------------------------------------
    Description: 
When a ScanStorageNode cancels its subscription by calling cancel, it is 
possible that a concurrent Subscriber receives a call to onNext:
{code:java}
// Rewind call

// Buffer is cleared
inBuff.clear();

if (activeSubscription != null) {
  // Subscription is cancelled but it is possible for a subscriber to call 
onNext and add rows to inBuff
  // but it is not what we want.
  activeSubscription.cancel();
  activeSubscription = null;
}
{code}


  was:
When a ScanStorageNode cancels its subscription by calling cancel, it is 
possible that a concurrent Subscriber receives a call to onNext:
{code:java}
// Rewind call

// Buffer is cleared
inBuff.clear();

if (activeSubscription != null) {
  // Subscription is cancelled but it is possible for a subscriber to call 
onNext and add rows to inBuff but it is not what we want.
  activeSubscription.cancel();
  activeSubscription = null;
}
{code}



> Sql. StorageScanNode SubscriberImpl onNext can be called after subscription 
> is cancelled
> ----------------------------------------------------------------------------------------
>
>                 Key: IGNITE-24017
>                 URL: https://issues.apache.org/jira/browse/IGNITE-24017
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql
>            Reporter: Maksim Zhuravkov
>            Priority: Major
>              Labels: ignite-3
>
> When a ScanStorageNode cancels its subscription by calling cancel, it is 
> possible that a concurrent Subscriber receives a call to onNext:
> {code:java}
> // Rewind call
> // Buffer is cleared
> inBuff.clear();
> if (activeSubscription != null) {
>   // Subscription is cancelled but it is possible for a subscriber to call 
> onNext and add rows to inBuff
>   // but it is not what we want.
>   activeSubscription.cancel();
>   activeSubscription = null;
> }
> {code}



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

Reply via email to