mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "latino (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (FTPSERVER-289) Implement locking mechanism for files.
Date Wed, 25 Sep 2013 18:10:03 GMT

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

latino edited comment on FTPSERVER-289 at 9/25/13 6:08 PM:
-----------------------------------------------------------

file locking mechanism is required as server runs inside a single JVM: any thread inside the
JVM is allowed to write file unless you provide a lock mechanism.
While using FileLock in nio package, you assure inter-process safe access, but not inter-thread.
in the last Apache FTP Server release is still possible to get more fileOutputStream open
on the same file by different threads ( see NativeFTPFile class and STOR command implementation
class and consider concurrent FTPSessions of the same user, e.g the old session is attempting
to close stream, while the new one is opening for write). 
Could be appreciated a unique fileOutStream object per file?
                
      was (Author: ginolatino):
    file locking mechanism is required as server runs inside a single JVM, so any thread inside
the JVM is allowed to write file unless you provide a lock mechanism.
While using FileLock in nio package, you assure inter-process safe access, but not inter-thread.
So for consistency reason we would require file locking.
in the last Apache FTP Server release is still possible to get more fileOutputStream open
on the same file by different threads ( see NativeFTPFile class and STOR command implementation
class). 
Could be appreciated a unique fileOutStream object per file??
                  
> Implement locking mechanism for files.
> --------------------------------------
>
>                 Key: FTPSERVER-289
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-289
>             Project: FtpServer
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 1.0.0
>            Reporter: David Latorre
>             Fix For: WISHLIST
>
>
> In order to solve FTPSERVER-288 , this is, to prevent the possibility of race conditions
in STOU command  ( it is possible that non-unique filenames be generated with the current
implementation) we would eventually need that there was some file locking mechanism which
might be a mechanism to keep track of in-use files.

--
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

Mime
View raw message