This issue has been created
There are 4 updates, 1 comment.
 
 
XWiki Commons / cid:jira-generated-image-avatar-a10b941f-7fc5-43c4-b611-3e3a7f5ccb03 XCOMMONS-3363 Open

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

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-b26d2467-2de2-43f4-a04c-deed79ebdd9c Michael Hamann created this issue on 13/Jun/25 17:15
 
Summary: The cache loader blocks and throws when setting the cache value blocks and throws
Issue Type: cid:jira-generated-image-avatar-a10b941f-7fc5-43c4-b611-3e3a7f5ccb03 Bug
Affects Versions: 17.3.0
Assignee: Unassigned
Components: Cache
Created: 13/Jun/25 17:15
Labels: performance
Priority: cid:jira-generated-image-static-major-69a24419-dc1d-4a85-8a04-831cad835166 Major
Reporter: Michael Hamann
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.

 
 

4 updates

 
cid:jira-generated-image-avatar-b26d2467-2de2-43f4-a04c-deed79ebdd9c Changes by Michael Hamann on 13/Jun/25 17:15
 
Fix Version: 17.4.1
Fix Version: 16.10.9
Fix Version: 17.5.0-rc-1
Assignee: Michael Hamann
 
 

1 comment

 
cid:jira-generated-image-avatar-b26d2467-2de2-43f4-a04c-deed79ebdd9c Michael Hamann on 13/Jun/25 17:16
 

While the cache loader isn't part of XWiki 16.10.8, it has been merged for 16.10.9 so this should also be backported for 16.10.9.