Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Critical
-
Resolution: Unresolved
-
Affects Version/s: 3.0 M3
-
Fix Version/s: None
-
Component/s: Storage
-
Labels:None
-
Difficulty:Unknown
-
Similar issues:
XWIKI-6170Cache incoherency caused by duplication of documents in the cache. XWIKI-6169Cache incoherency from collisions in cache key generation. XWIKI-4824Temporary objects are persisted in the document cache XWIKI-8160HiddenDocument query filter can put corrupted user documents in the cache (virtual mode) XWIKI-937Caching documents breaks the inline edit mode XWIKI-3168Changing the document syntax without saving the document can cause an invalid document state XWIKI-8979Document 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-1651Different format for $doc.creationDate when $doc is retrieved from cache XWIKI-4930List of orphaned documents seems incorrect
Description
I have not identified the cause of this yet but it has been observed on xwiki.org.
My hypothesis:
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.
If the lost document were class documents it was probably related to
XWIKI-8046.