in rare circumstances StandardQueryCache throws ObjectNotFoundException in multi threaded environment.
This happens if an Entity is deleted from the 2nd level cache (by a second thread) just between the following two events:
1. The QueryCache returning the CacheKey for the Entity
2. The Entity actually being assembled from the EntityCache by the TypeHelper
It is easy to simulate this be adding a breakpoint at line 158, deleting the Entity from within a second thread and then resume StandardQueryCache thread.
My solution to fix this is to catch the ObjectNotFoundException in addition to the UnresolvableObjectException and EntityNotFoundException. See attached path
Andy
|