[ 
https://jira.codehaus.org/browse/MRM-1702?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Olivier Lamy closed MRM-1702.
-----------------------------

    Resolution: Fixed
      Assignee: Olivier Lamy

I have started to work on a file locking mechanism.
It's not activated per default but you can activate via the ui.
 
                
> Race condition caused by retrieving the same artifact from a Proxy from 
> muliple threads
> ---------------------------------------------------------------------------------------
>
>                 Key: MRM-1702
>                 URL: https://jira.codehaus.org/browse/MRM-1702
>             Project: Archiva
>          Issue Type: Bug
>    Affects Versions: 1.4-M1
>         Environment: RHEL6
>            Reporter: charles kim
>            Assignee: Olivier Lamy
>             Fix For: 2.0.0
>
>         Attachments: ArchivaDavResource_patch.txt, 
> DefaultRepositoryProxyConnectors_patch.txt
>
>
> When multiple requests are made for the same artifact where proxy is used 
> (meaning there is no local file exists yet), there is a race condition.
> A code block that moves the downloaded temp file to target location is in 
> synchronized block which does prevent them from writing the same file, 
> Before moving the temp file to the target location, it overwrites the 
> existing file ( by first checking the file existence and removes it). 
> By removing it (from the 2nd thread), the first thread that wrote the file 
> and and tries to spool the file again throws  java.io.FileNotFoundException.
> Please see attached patch.
> Thanks

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to