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

Yakov Zhdanov commented on IGNITE-4887:
---------------------------------------

Alexey,

It seems that dev list is a better place for discussions like this. Tickets 
should be filed after some consensus is reached.

I don't like the suggestion because we can end up in millions of uncommitted 
transactions. Imagine none picks paused transaction and it is never committed. 
We will have stale locks all over our cache with no understanding about when 
they should be released. This can happen due to some exceptions or due to bugs 
in code.

Why don't  you pass the whole transaction to that async future's listener? So 
transaction gets started and committed in single method.

Thanks!

Yakov

> Support for starting transaction in another thread
> --------------------------------------------------
>
>                 Key: IGNITE-4887
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4887
>             Project: Ignite
>          Issue Type: Improvement
>          Components: general
>    Affects Versions: 1.9
>            Reporter: Alexey Kuznetsov
>            Assignee: Alexey Kuznetsov
>
> Consider the following pseudo-code:
> {code:xml}
>         IgniteTransactions transactions = ignite1.transactions();
>         Transaction tx = startTransaction(transactions);
>         cache.put("key1", 1);
>         tx.stop();
> {code}
> And in another thread:
> {code:xml}
>                 transactions.txStart(tx);
>                 cache.put("key3", 3);
>                 cache.remove("key2");
>                 tx.commit();
> {code}
> The Api should be implemented , that let you continue transaction in another 
> thread.
> method stop() should mark the transaction as unavailable for further commit.
> method txStart() should resume the transaction. 
> reason behind the proposal :
> Consider the next scenario:
> we begin transaction, doing some changes and start async future that will be 
> able to introduce futher changes into transaction and commit it in the end.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to