Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
6.2.X EE, Master
-
7.2.x, 7.0.x
-
Committed
-
2
-
Performance
Description
Reproduction steps 6.2.x
Deploy the attached plugin (the attahed zip file) and place it on a page. On each page reload, the plugin does the following:
1. Add a Foo
2. Delete the Foo
3. Search for the Foo using a Finder
Result: see attached stacktrace (.log file)
Actual: ObjectNotFoundException
Expected: NoSuchFooException
Reproduced
6.2.x branch.
Master
Further notes from EE team
What I've gathered so far, is that when Foo is deleted, it is deleted from the EntityCache, but not from the FinderCache. When it is being queried via the API, its primaryKey is found in the FinderCache - since it's not in the EntityCache however, it is being queried from the database, which does not contain it, hence the exception.
The plugin was built using the Plugins SDK 6.2 SP20, using the sample service-builder plugin but adding a Finder to it, as well as a "findBy" method to call the generated persistence API.
QA information - Master
Reproduction steps
- Start portal master
- Deploy the attached jar files (finder.service.builder.api and finder.service.builder.service)
- Run the attached groovy script (testFinderCacheIssue.groovy)
Expected result after the fix: finder.service.builder.exception.NoSuchFooException
Original behavior before the fix: com.liferay.portal.kernel.dao.orm.ObjectNotFoundException
Attachments
Issue Links
- relates
-
LPE-16440 Cache is not cleared after create, delete, create for the same object
-
- Open
-