Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-3363

The cache loader blocks and throws when setting the cache value blocks and throws

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      Steps to reproduce:

      I have no real steps to reproduce this on a real instance, however, on real instances we observed that stack overflow errors lead to invalid states in locks on caches, which lead to cache writes blocking for 10 seconds and then throwing an exception.

      Expected result:

      When the cache cannot be written, the obtained value should still be returned immediately for any thread that is waiting for the load, and while the caller should wait for the cache to be written, it doesn't make much sense for the caller to get the exception that is thrown when setting the cache. Instead, the exception should be logged.

      Actual result:

      All threads that are waiting for the value to load are still blocked while the cache is written, and the exception that is thrown by the cache store is thrown in all waiting threads.

      Attachments

        Activity

          People

            MichaelHamann Michael Hamann
            MichaelHamann Michael Hamann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: