[jira] [Commented] (TIKA-3208) tika-server Detect when using fileUrl header does not close the file handle

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (TIKA-3208) tika-server Detect when using fileUrl header does not close the file handle

Nicholas DiPiazza (Jira)

    [ https://issues.apache.org/jira/browse/TIKA-3208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17211450#comment-17211450 ]

Hudson commented on TIKA-3208:
------------------------------

UNSTABLE: Integrated in Jenkins build Tika » tika-branch1x-jdk8 #22 (See [https://ci-builds.apache.org/job/Tika/job/tika-branch1x-jdk8/22/])
TIKA-3208 -- close the stream in DetectorResource (tallison: [https://github.com/apache/tika/commit/5d3af5ee433eb94a3a592e55b6d125697c72001d])
* (edit) tika-server/src/main/java/org/apache/tika/server/resource/DetectorResource.java


> tika-server Detect when using fileUrl header does not close the file handle
> ---------------------------------------------------------------------------
>
>                 Key: TIKA-3208
>                 URL: https://issues.apache.org/jira/browse/TIKA-3208
>             Project: Tika
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 1.23, 1.24, 1.24.1
>         Environment: Centos 7
> java 1.8
>  
>            Reporter: Darren Cooper
>            Priority: Major
>             Fix For: 1.25
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> When using the fileUrl header to detect a file on localdisk the java process does not release the file handle.
> When the detected file is deleted, the disk space is not released because of the open file handle.
> Test
> curl -X PUT -H "fileUrl: file:///root/test.pdf" [http://localhost:9998/detect/stream]
> rm /root/test.pdf
> lsof of (pid of java tika-server)--
> file handle open to /root/test.pdf (deleted)
>  
> As a test fix tika-server/src/main/java/org/apache/tika/server/resource/DetectorResource.java was modified to add
> try {
>  tis.close();
>  } catch (Exception e) {}
>  
> to the finally blcok in public detect and the problem seemed to be resolved.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)