This issue has been created
 
 
XWiki Platform / cid:jira-generated-image-avatar-a26af164-a3d8-46aa-b018-bef6b51a4712 XWIKI-23055 Open

The document cache may not be properly invalidated in case of concurrent loads

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-7530014b-2546-4ecf-9c8b-f8199d044325 Michael Hamann created this issue on 28/Mar/25 14:07
 
Summary: The document cache may not be properly invalidated in case of concurrent loads
Issue Type: cid:jira-generated-image-avatar-a26af164-a3d8-46aa-b018-bef6b51a4712 Bug
Affects Versions: 14.10
Assignee: Unassigned
Components: Old Core
Created: 28/Mar/25 14:07
Priority: cid:jira-generated-image-static-major-9b326095-6c1b-4d20-8524-4a2107e0f999 Major
Reporter: Michael Hamann
Description:

Steps to reproduce:

These are not steps meant to be reproduced by a human, they are more a description of what happens internally. We assume that these steps happen currently in SecurityCacheStressIT on CI:

1. Thread 1 starts loading document A in version 1 from the database as it is missing in the document cache. The document is essentially completely but the hibernate store didn't return yet.
2. Thread 2 saves version 2 of document A and removes it from the cache (not really needed, but it does, anyway)
3. Thread 1 inserts version 1 into the cache.

Expected result:

Thread 1 doesn't insert version 1 of document A into the cache.

Actual result:

Thread 1 inserts version 1 of document A into the cache, subsequent loads of document A from the cache return version 1 instead of the new version 2.