Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-13792

Non-blocking transaction commit/rollback

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • 14.0.0.Dev03
    • None
    • Server, Transactions
    • None

    Description

      In the server, if a cache is configured as transactional but the client is non-transactional, each write operation is wrapped in a Transaction.

      A single key write jumps between multiple threads:

      • non-blocking-thread delivers the request
      • When completed, the Transaction.commit() is executed in a blocking-thread and the thread waits there.
      • A jgroups-thread delivers the response from other nodes in the cluster and unblocks the blocking-thread
      • blocking-thread put the remaining execution in the non-blocking-thread where the response is sent back to the client.

      We can use the non-blocking prepare and commit if all the following conditions are met:

      • It is an EmbeddedTransaction. Transaction s from another TransactionManager won't be supported
      • Infinispan is the only resource enlisted (XaResource or Synchronization but never both)

      Change of plans

      Create non-blocking commit() and rollback() methods. Blocking XaResource or Synchronization can be executed in a blocking thread while Infinispan resources are committed in a non-blocking fashion.

      Attachments

        Issue Links

          Activity

            People

              pruivo@redhat.com Pedro Ruivo
              pruivo@redhat.com Pedro Ruivo
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: