Julian Sedding created SLING-12442:
--------------------------------------
Summary: Regression due to SLING-11299
Key: SLING-12442
URL: https://issues.apache.org/jira/browse/SLING-12442
Project: Sling
Issue Type: Bug
Components: Scripting
Affects Versions: Scripting JSP 2.6.2, Scripting JSP 2.6.0
Reporter: Julian Sedding
Assignee: Julian Sedding
Fix For: Scripting JSP 2.6.4
The fix for SLING-11299 introduced a regression. With that change, a JSP script
is re-compiled whenever an exception occurs during the execution of the script.
To fix the immediate issue, in this ticket, the "improved" error logging will
be reverted to what it was before SLING-11299. Restoring this improvement will
be covered in a separate ticket.
Re-compilation performs the following (non-atomic/non-synchronized) steps
* delete old java file
* delete old class file
* generate new java file
* compile new java file to class file
* add smap data (java source maps for languages that are converted to java
source)
** write tmp class file with added smap data (non-randomized file name)
** delete class file
** move tmp class file to class file path
Any request threads that want to render the same JSP script, and that observe
that the class file is missing, will also start recompilation with all steps
from above.
This can lead to multiple threads throwing exceptions due to an unexpected
state on the file system. Especially under load, it can be difficult for the
system to recover from such a situation.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)