Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-4887

Support transaction continuation in another thread

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: In Progress
    • Major
    • Resolution: Unresolved
    • 1.9
    • None
    • general
    • None

    Description

      Consider the following pseudo-code:

              IgniteTransactions transactions = ignite1.transactions();
              Transaction tx = startTransaction(transactions);
              cache.put("key1", 1);
              tx.stop();
      

      And in another thread:

                      transactions.txStart(tx);
                      cache.put("key3", 3);
                      cache.remove("key2");
                      tx.commit();
      

      The Api should be implemented , that let you continue transaction in another thread.
      method suspend() should mark the transaction as unavailable for further commit.
      method resume 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.

      Attachments

        1. HangTest.txt
          2 kB
          Alexey Kuznetsov

        Issue Links

          Activity

            People

              Alexey Kuznetsov Alexey Kuznetsov
              Alexey Kuznetsov Alexey Kuznetsov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h 40m
                  4h 40m