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

Alexey Kuznetsov commented on IGNITE-4887:
------------------------------------------

Добавлены следующие тесты :

||Сценарий||Результат прохождения||
|Старт транзакций в одном потоке, запись по одному ключу, suspend поочереди. 
Далее resume и коммит поочереди (только для pessimistic) |Будет сохранена 
последняя запись по данному ключу|
|Запись pessimistic тарнзакции по ключу до suspend и после resume в другом 
потоке | Запись в другом потоке после resume не блокируется из-за remote locka|
|Старта транзакции, запись по ключу и suspend. Далее resume в другом потоке и 
приостановка(до коммита). В первом потоке начинаем новую транзакцию, комитим 
запись. Далее, продолжаем первую транзакцию и комитим из нее. |Будет сохранена 
запись первой транзакции, которую закомитили последней|
|Запись pessimistic тарнзакции по ключу, suspend ее навсегда. Далее, стартуем 
новую pessimistic транзакцию, пробуем делать запись по такому же ключу | Вторая 
транзакция ожидает разблокировки на ключе, во время put|
|Запись pessimistic тарнзакции по ключу, suspend ее навсегда. Далее, пробуем 
ставить cache lock на тот же ключ| Cache lock блокируется из-за remote lock'а 
на сущности|


> 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