ModeShape/modeshape — pull request #747 by rhauch (2013-03-18 19:14:55+00:00)
Title: MODE-1858 Building query results should work when nodes are concurrently removed

When the query results are being processed/produced, any node that is not found is simply ignored (treated as non-existant from the perspective of the query). However, in certain cases, the timing of a removal could occur within the method that obtains the document from the cache, causing an exception. This was rectified to return null in such cases. Thus, the existing code in the BasicTupleCollector that handles null nodes will continue to work in all cases.

I was not able to come up with a test case able to replicate this scenario, however. That's because the failure occurs within a single WorkspaceCache method, after the SchematicEntry is obtained but before the SchematicEntry's content document can be obtained. A test case cannot reliably ensure this condition occurs (without adding junk code within the WorkspaceCache).