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

ASF subversion and git services commented on WICKET-6236:
---------------------------------------------------------

Commit 7d3b7a8660801c7024b863c971c701c7336fefa9 in wicket's branch 
refs/heads/wicket-7.x from Pedro Henrique Oliveira dos Santos
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=7d3b7a8 ]

WICKET-6236 honoring the javadoc by putting a wait only after the 10th failed 
attempt to delete a file


> Files.remove() causes a 5 seconds delay instead of 500ms as was intended
> ------------------------------------------------------------------------
>
>                 Key: WICKET-6236
>                 URL: https://issues.apache.org/jira/browse/WICKET-6236
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.23.0, 6.24.0
>         Environment: Windows 7
>            Reporter: eloy arce
>            Assignee: Pedro Santos
>            Priority: Minor
>              Labels: delay, delete, files, sleep
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> The method Files.remove(final java.io.File file) has a cycle for trying to 
> delete a file.
> As Javadoc says, it was intended to re-try 50 times, with a delay of 100ms at 
> each 10th attemp (implemented with 2 cycles, one inside another), but 
> acctually it has a 100ms delay EACH time, because the sleep is inside the 
> inner cycle. This produces a delay of 5 secs for each file, and if you have 
> about 10 files it's a lot of time (about a minute).
> In windows using a page that has a model with a list of FileUpload, it tries 
> to delete the files each time it recovers the Page from PageStore, and (I 
> dont know why) can't delete any of the files, resulting in the mentioned 
> delay. (in linux it works without problem)
> Besides the problem with windows locking the files, If the cycle works as 
> intended (the sleep in the outer cycle), the problem will be smaller.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to