ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yakov Zhdanov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-4887) Support for starting transaction in another thread
Date Tue, 27 Jun 2017 23:42:00 GMT

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

Yakov Zhdanov commented on IGNITE-4887:

Alexey, can you point me to a tests for new functionality that includes multiple server nodes
and client nodes as transaction initiators?

Can you please implement the following test for all tx combinations and let me know the results?

1 client and 1 server in topology.

Client1 - thread1
for i=0..10
tx start
cache.put(1, i); // I think for pessimistic TX this loop should hang on 2nd iteration (since
lock is held by another tx), but I suspect that in current implementation this will pass.

Client1 - thread2
for tx in txList

Please take a look at my upsource review comments.

I have to cancel patch for now since it seems we have very few tests and need to extend test

Let me know when comments are fixed.

> 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

View raw message