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

An operation that fails but it's silent shouldn't abort the transaction internally

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 5.1.0.CR2
    • 5.1.0.BETA2
    • None
    • None

      I have a system that performs a large number of tasks in a single transaction for efficiency. Some of those tasks access infinispan caches.

      I found that occasionally I have been getting lock timeouts for the default 15 second period.

      Lock contention is not a problem - but the impact of failing to obtain the lock results in the whole transaction being aborted, which aborts the work also carried out for potentially a large number of other tasks, resulting in all of the work being retried.

      I was wondering if it would be possible to provide an alternative lock implementation the AdvancedCache that allowed a client app to test whether the lock was available and acquire it - returning 'true', but if the lock was not available, simply returning false, allowing the client code to make a decision about how to proceed.

      In my case, I could then add the specific task to a retry queue, and move onto the next task, committing all of the work that had been successfully completed for the other tasks.

        1. CacheTxStackTrace.log
          8 kB
        2. Sample2Test.java
          4 kB
        3. SampleTest.java
          3 kB
        4. serverISPNTrace.log.zip
          5.15 MB

              rh-ee-galder Galder Zamarreño
              gary@brownuk.com Gary Brown
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: