This issue has been created
There is 1 update.
 
 
XWiki Platform / cid:jira-generated-image-avatar-59395d4d-463a-4632-b367-4a84052ac0dd XWIKI-24673 Open

Race condition in XWiki cache store can lead to existing documents reported as not-existing

 
View issue   ·   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-c9547141-0720-45bf-aa7a-5c50337a1bb5 Michael Hamann created this issue on 07/Aug/26 17:15
 
Summary: Race condition in XWiki cache store can lead to existing documents reported as not-existing
Issue Type: cid:jira-generated-image-avatar-59395d4d-463a-4632-b367-4a84052ac0dd Bug
Affects Versions: 17.10.0
Assignee: Unassigned
Components: Old Core
Created: 07/Aug/26 17:15
Priority: cid:jira-generated-image-static-major-7e078438-4c13-441e-8263-9b49cd387c56 Major
Reporter: Michael Hamann
Description:

There are no real steps to reproduce as this is a race condition that is most likely very hard to reproduce but that might have caused integration test failures due to XWiki.XWikiServerClass being reported as missing (just a theory, not confirmed). What is confirmed is that the following could in theory happen in XWikiCacheStore:

Thread A calls store.exists(XWiki.XWikiServerClass)false (not created yet in the database).
Thread B runs the mandatory document initializer and saves the class: {{invalidateCache(key)}}removes both the exists and the actual page entry under the write lock.
Thread A calls pageExistCache.set(key, FALSE), storing that the page doesn't exist in the cache.

The timing looks implausible and can probably only reproduced under a specific load pattern. Still, it's a cache correctness bug that can have the consequence that a freshly created document is reported as non-existing. The lifetime of the cache is infinite, but further invalidation or a full cache can remove the invalid entry again.

 
 

1 update

 
cid:jira-generated-image-avatar-c9547141-0720-45bf-aa7a-5c50337a1bb5 Changes by Michael Hamann on 07/Aug/26 17:15
 
Assignee: Michael Hamann