major
nice-to-have
minor
Before Lucene attempts to index an object, it must check whether the object still exists in the context of the Lucene thread.
This becomes apparent after change #25694, which logs errors with DeletedObjectAccess.
However, the actual problem lies in the cache handling within the tl:KnowledgeBase: When an object is created, this change is passed on to tl:UpdateListener via a tl:UpdateEvent. Both the tl:LuceneIndex and the internal caches of the tl:KnowledgeBase are such tl:UpdateListeners. Now it all depends on the order in which these listeners are notified. If you’re unlucky, the tl:LuceneIndex receives the event and attempts to index the new object before the tl:KnowledgeBase has been notified of the update and could ensure, for example, that the attributes of the type of the newly created object are accessible (this problem only occurs in the demo with C-types, since these are local to a context object and are created together with their instances).
Solution: Notify internal caches before the “public” listeners.
Test
No test.