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

Non-blocking transaction commit/rollback

XMLWordPrintable

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

      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.

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

                Created:
                Updated:
                Resolved: