This issue has been created
There are 2 updates.
 
 
XWiki Platform / cid:jira-generated-image-avatar-6d69d139-2e08-4753-8db7-0339e9c0b3cc XWIKI-23220 Open

Slow performance due to inefficient cache remove calls in template manager

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-c0982845-04d9-45ea-ba80-ed4e9588df57 Michael Hamann created this issue on 20/May/25 11:16
 
Summary: Slow performance due to inefficient remove calls in template manager
Issue Type: cid:jira-generated-image-avatar-6d69d139-2e08-4753-8db7-0339e9c0b3cc Bug
Affects Versions: 15.8-rc-1
Assignee: Unassigned
Components: Old Core
Created: 20/May/25 11:16
Labels: performance
Priority: cid:jira-generated-image-static-critical-50cfc110-8883-4560-907a-0b32bafbb304 Critical
Reporter: Michael Hamann
Description:

Steps to reproduce:

Trigger a huge number of rendering errors (in parallel).

Expected result:

The requests complete quickly.

Actual result:

Errors like

org.infinispan.util.concurrent.TimeoutException: ISPN000299: Unable to acquire lock after 60 seconds for key environment:/templates/xwikirenderingerror/rendering.macro.error.failed.vm and requestor CommandInvocation:<local>:9615112. Lock is held by CommandInvocation:<local>:9615111

appear.

 
 

2 updates

 
cid:jira-generated-image-avatar-c0982845-04d9-45ea-ba80-ed4e9588df57 Changes by Michael Hamann on 20/May/25 11:17
 
Summary: Slow performance due to inefficient cache remove calls in template manager
Description: *Steps to reproduce:*

Trigger a huge number of rendering errors (in parallel).

*Expected result:*

The requests complete quickly.

*Actual result:*

Errors like {noformat}org.infinispan.util.concurrent.TimeoutException: ISPN000299: Unable to acquire lock after 60 seconds for key environment:/templates/xwikirenderingerror/rendering.macro.error.failed.vm and requestor CommandInvocation:<local>:9615112. Lock is held by CommandInvocation:<local>:9615111{noformat} appear.
This is because the [code|https://github.com/xwiki/xwiki-platform/blob/9e7b4c03f2143978d891109a17159f73d4cdd318/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/template/InternalTemplateManager.java#L1023] removes non-existing templates from the cache regardless if they ever existed.