[MGNLCACHE-128] EhCacheWrapper does not catch LockTimeOutException properly Created: 10/Feb/16  Updated: 14/Mar/17  Resolved: 24/Mar/16

Status: Closed
Project: Cache Modules
Component/s: ehcache
Affects Version/s: 5.4
Fix Version/s: 5.4.4

Type: Bug Priority: Neutral
Reporter: Rico Jansen Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Visible to:
Mathijn Elhorst, Michiel Meeuwissen, Nils Breunese
Sprint: Kromeriz 36
Story Points: 1

 Description   

I am seeing exceptions in our monitoring system (New Relic) with regards to LockTimeOutExceptions generating error 500 pages. These are caused by pages being rendered too slow (our problem).

However I do not see those errors in the magnolia log, which I would expect.

Some investigation turns up that info.magnolia.module.cache.filter.CacheFilter#doFilter catches a info.magnolia.module.cache.exception.MgnlLockTimeoutException and logs a warning in that case.

The code that is supposed to throw that exception in info.magnolia.module.cache.ehcache.EhCacheWrapper#get is faulty.
The get() call on ehcache is outside of the try/catch instead of in it.
The code inside the try/catch is just returning the result object and will never throw a LockTimeoutException.

This means the MgnlLockTimeoutException will never be thrown.
Therefore there will be no magnolia log messages.


Generated at Sun Feb 11 23:52:29 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.