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

Vladislav Pyatkov updated IGNITE-17666:
---------------------------------------
    Description: 
h3. Motivation

Read-only transactions start a scan operation and save transaction cursors on 
the replica side. The cursors stay on the server until they are closed. 
Read-only transactions finish locally and do not notify all replicas of the 
transaction.

h3. Definition of done

# Enlist node to RO transaction.
# Prohibit adding operations to the read-only transaction after the transaction 
is finished.
# Send the finish transaction request to all enlisted nodes to close cursors.

  was:
After cursor was changed in IGNITE-17309, the cancel operation does not close a 
cursor opened on a remote node. This proposes to close all resources when the 
corresponding transaction commits.

But it is still worth to close a cursor just after all data scanned or when a 
client invokes a cancel manually. This has no meaning for implicit 
transactions, because the those transactions are closed just after the scan 
complete.

The server side logic is already implemented, for close a cursor required to 
send a close message through the replication layer. The close message (look at 
{_}ScanCloseReplicaRequest{_}) should be sent after a subscriber is received a 
last one batch of entries or _Subscription#cancel_ is invoked.
 


> Scan subscription cancel does not close a server side cursor
> ------------------------------------------------------------
>
>                 Key: IGNITE-17666
>                 URL: https://issues.apache.org/jira/browse/IGNITE-17666
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Vladislav Pyatkov
>            Priority: Major
>              Labels: ignite-3
>
> h3. Motivation
> Read-only transactions start a scan operation and save transaction cursors on 
> the replica side. The cursors stay on the server until they are closed. 
> Read-only transactions finish locally and do not notify all replicas of the 
> transaction.
> h3. Definition of done
> # Enlist node to RO transaction.
> # Prohibit adding operations to the read-only transaction after the 
> transaction is finished.
> # Send the finish transaction request to all enlisted nodes to close cursors.



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

Reply via email to