ignite-go-client icon indicating copy to clipboard operation
ignite-go-client copied to clipboard

Transaction Support

Open tlnsave12345 opened this issue 6 years ago • 6 comments

Hi, Thanks for the golang client. Please point me to the "Transaction" APIs. For example if I want to do 2 "put"s as part of one transaction. Thanks

tlnsave12345 avatar May 22 '18 22:05 tlnsave12345

Hi, I have not implemented transactions yet. I need to ask Apache Ignite community is it supported by thin client protocol. I come back soon. Thanks

amsokol avatar May 24 '18 21:05 amsokol

Hi, Transactions are not supported by Apache Ignite thin client protocol yet. Waiting for protocol update.

amsokol avatar May 27 '18 07:05 amsokol

Hi,

it seems that apache ignite now has the support for txs (at least in java):

https://apacheignite.readme.io/docs/transactions

try (Transaction tx = transactions.txStart()) {
    Integer hello = cache.get("Hello");
  
    if (hello == 1)
        cache.put("Hello", 11);
  
    cache.put("World", 22);
  
    tx.commit();
}

mixaal avatar Jul 24 '18 11:07 mixaal

Hi @mixaal

You are absolutely right if we are talking about Java or .NET client. Another languages are using Binary Client Protocol: https://apacheignite.readme.io/docs/binary-client-protocol It does not support transaction commands yet (((

amsokol avatar Jul 27 '18 13:07 amsokol

Hello, it seems that it is now implemented (but apparently not documented yet) : https://github.com/apache/ignite/pull/6734 (corresponding ticket in Jira: https://issues.apache.org/jira/browse/IGNITE-9410)

There is some documentation though in the corresponding IEP: https://cwiki.apache.org/confluence/display/IGNITE/IEP-34+Thin+client%3A+transactions+support

dkurzaj avatar Nov 08 '19 16:11 dkurzaj

we use your client, transactions are very necessary

LazarenkoA avatar Aug 12 '22 15:08 LazarenkoA