[
https://issues.apache.org/jira/browse/FTPSERVER-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13777821#comment-13777821
]
latino commented on FTPSERVER-289:
----------------------------------
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