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

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

[~Alexey Kuznetsov] your test list look good to me. However, you miss 
multithreaded tests where transactions get suspended/resumed and 
committed/rolled back on  random basis from N threads.

Please suggest some scenarios.

Also, you want to turn Ignite TX to an entity that can be passed among threads. 
This requires Ignite TX to become fully thread safe. What if several threads 
will try to resume the same transaction and commit/rollback it? in my 
understanding this should result to exception. In order to protect against this 
you will have to introduce some locking mechanisms which I am afraid may result 
in performance penalty. Make sure to suggest scenarios for illegal resume and 
suspend.

Another point - you will have to add check that all TX operations are called 
from threads currently owning this transaction. I think this is absent as well 
for now.

Thanks!

> 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
>         Attachments: HangTest.txt
>
>
> 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.4.14#64029)

Reply via email to