Details
-
Bug
-
Resolution: Fixed
-
Blocker
-
1.8 RC2
-
None
Description
The XWikiContext uses a LRUMap to store a set of classes and documents that were loaded in the current request, so that documents are not requested more than once from the database in the same request. This works well for normal requests, since a context is used by a single thread for a single request. The problem is that background threads are created with the same context object, thus the LRUMap is accessed in parallel by several threads. And, as the documentation says, LRUMaps are not synchronized, and in large wikis a livelock soon occurs, blocking all background threads in infinite loops.