Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-12442

Regression due to SLING-11299

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Scripting JSP 2.6.0, Scripting JSP 2.6.2
    • Scripting JSP 2.6.4
    • Scripting
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              jsedding Julian Sedding
              jsedding Julian Sedding
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: