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

JCache CacheEntryCreatedListener got TimeoutException ISPN000299 when listener calling code which accessing the created cache value

    XMLWordPrintable

Details

    • Bug
    • Status: New (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.0.3.Final
    • None
    • API, Core, JCache
    • None
    • Hide
      1. configured a local cache (i.e. TestCache) with default settings
      2. a simple service bean ServiceA with a dummy method foo() annotated with @CacheResult(cacheName = 'TestCache'), which just return string "THIS_IS_RESULT_OF_FOO"
      3. a simple service bean ServiceB with a dummy method bar() which return (ServiceA.foo() + "_PROCESSED_BY_BAR")
      4. a JCache CacheEntryCreatedListener which calling ServiceB.bar() and register to TestCache

      When calling ServiceA.foo(), expecting ServiceA will generate a random string and got cached, then trigger the cache entry created listener to notify ServiceB to regenerate its value.

      ISPN-11942.zip is a simple standalone application to reproduce this issue, change infinispan version from 10.1.8.Final to 9.1.7.Final will work correctly. Attached the trace log ISPN-11942-fail.log when stay on 10.1.8.Final and ISPN-11942-success.log when changed to 9.1.7.Final.

      Show
      configured a local cache (i.e. TestCache) with default settings a simple service bean ServiceA with a dummy method foo() annotated with @CacheResult(cacheName = 'TestCache'), which just return string "THIS_IS_RESULT_OF_FOO" a simple service bean ServiceB with a dummy method bar() which return (ServiceA.foo() + "_PROCESSED_BY_BAR") a JCache CacheEntryCreatedListener which calling ServiceB.bar() and register to TestCache When calling ServiceA.foo(), expecting ServiceA will generate a random string and got cached, then trigger the cache entry created listener to notify ServiceB to regenerate its value. ISPN-11942.zip is a simple standalone application to reproduce this issue, change infinispan version from 10.1.8.Final to 9.1.7.Final will work correctly. Attached the trace log ISPN-11942-fail.log when stay on 10.1.8.Final and ISPN-11942-success.log when changed to 9.1.7.Final.

    Description

      We are running into issue when upgrading infinispan from 9.1.7.Final to 9.2.0.Final and got the TimeoutException: ISPN000299: Unable to acquire lock after X seconds for key Y...

      We reduced our settings and finally reproduce it in a simple setup:

      1. configured a local cache (i.e. TestCache) with default settings
      2. a simple service bean ServiceA with a dummy method foo() annotated with @CacheResult(cacheName = 'TestCache'), which just return string "THIS_IS_RESULT_OF_FOO"
      3. a simple service bean ServiceB with a dummy method bar() which just return (ServiceA.foo() + "_PROCESSED_BY_BAR")
      4. a JCache CacheEntryCreatedListener which calling ServiceB.bar() and register to TestCache

      When calling ServiceA.foo(), expecting ServiceA will generate a random string and got cached, then trigger the cache entry created listener to notify ServiceB to regenerate its value.

      We also tested on latest stable version (10.1.8.Final) and still have such issue. We checked versions one by one and confirmed this bug introduced between change of 9.1.7 and 9.2.0.

      ISPN-11942.zip is a simple standalone application to reproduce this issue, change infinispan version from 10.1.8.Final to 9.1.7.Final will work correctly. Attached the trace log ISPN-11942-fail.log when stay on 10.1.8.Final and ISPN-11942-success.log when changed to 9.1.7.Final.

      Attachments

        1. ISPN-11942-success.log
          445 kB
        2. ISPN-11942-fail.log
          379 kB
        3. ISPN-11942.zip
          6 kB

        Activity

          People

            Unassigned Unassigned
            sammyhk Sammy Chu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: