[MAGNOLIA-4568] Cache temp files are not cleared out in case of failure while rendering the content Created: 05/Oct/12  Updated: 19/May/14  Resolved: 15/Nov/12

Status: Closed
Project: Magnolia
Component/s: cache
Affects Version/s: 4.4.6
Fix Version/s: 4.4.10, 4.5.7

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

Attachments: Text File delete.tmp.files.always.patch    
Issue Links:
causality
is causing MAGNOLIA-4805 CLONE - Items with .cache. in their u... Closed
relation
is related to MAGNOLIA-5763 cachestream123456.tmp files are not r... Closed
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
Date of First Response:

 Comments   
Comment by Jan Haderka [ 08/Oct/12 ]

Patch against 4.4.x code base to always delete the temp files ... needs more testing and port to 4.5.x.

Comment by Tobias Mattsson [ 12/Oct/12 ]

I'm experiencing an NPE on line 395 of CacheResponseWrapper:

if(serveIfThresholdReached){
   replayHeadersAndStatus(originalResponse);
   out = originalResponse.getOutputStream();
>   log.debug("Reached threshold for in-memory caching. Will not cache and stream response directly to user. Cache temp file is {}", contentFile.getAbsolutePath());
   }
else{

Because contentFile is null.

It's happening when i try to access AdminCentral on URL http://localhost:8080/.magnolia/admincentral. The browser tries to access http://localhost:8080/VAADIN/widgetsets/info.magnolia.ui.vaadin.widgetset.MagnoliaWidgetSet/46FE3FC5EECAA83AF9941D2846FA5CD9.cache.js but gets a 500 returned due to the NPE.

Comment by Jan Haderka [ 15/Nov/12 ]

where is port to 4.5? I can see only 4.4 and master (5.0) in git commits tab.

Generated at Mon Feb 12 03:57:02 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.