Uploaded image for project: 'Tika'
  1. Tika
  2. TIKA-2903

RereadableInputStream does not close storeOutputStream in all casses in, temporary files remain locked

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.21
    • Fix Version/s: 1.22
    • Component/s: None
    • Labels:
    • Flags:
      Patch

      Description

      The TikaParser leaves a lot of temporary files with the name TIKA_streamstore_*.temp in the temp folder. Many of them are locked and may be deleted only after restart of the by the java process.

      The files are created by the org.apache.tika.utils.RereadableInputStream, which obviously does not close the storeOutputStream in all casses. Actually, it is closed only by the method rewind(), but it should be also closed by calling the overall close() method of the whole InputStream.

      A simple patch is provided.

        Attachments

        1. RereadableInputStream.patch
          0.4 kB
          Peter Fassev

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              fassev@gmx.de Peter Fassev
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: