Affects Version/s: 3.0 M3
Fix Version/s: None
XWIKI-6170 Cache incoherency caused by duplication of documents in the cache. XWIKI-6169 Cache incoherency from collisions in cache key generation. XWIKI-4824 Temporary objects are persisted in the document cache XWIKI-8160 HiddenDocument query filter can put corrupted user documents in the cache (virtual mode) XWIKI-937 Caching documents breaks the inline edit mode XWIKI-3168 Changing the document syntax without saving the document can cause an invalid document state XWIKI-8979 Document creator special rights are not always granted due to right caching issue XWIKI-1868 Caching documents breaks the WYSIWYG editors for the inline edit mode XWIKI-1651 Different format for $doc.creationDate when $doc is retrieved from cache XWIKI-4930 List of orphaned documents seems incorrect
I have not identified the cause of this yet but it has been observed on xwiki.org.
Somewhere, someone is not ending a transaction.
After their work is done and they leave the transaction open, they call getDocument()
getDocument() dutifully calls context.setDatabase() to change from the subwiki to the main wiki.
getDocument() calls the cache and asks for the document. The cache, not having the document, calls the store and asks it to load the document.
The store calls beginTransaction() but since the prior transaction was never closed, the new transaction is not begun and the database is not changed.
The store attempts to load the document from the subwiki and not being able to find it, returns an empty document.
The empty document is inserted into the cache but for the wrong wiki.
Then when someone on the main wiki asks for a document which is there, they get a message about no such document because the cache has an empty document stored under that name.