MaxKellermann commented on pull request #20:
URL: https://github.com/apache/commons-vfs/pull/20#issuecomment-756068383


   Most are - but look at the confusing commit which added `synchronized` to 
the FTP provider: cd9e19f8eb6de22a3a545064ab0e68254bd243a2
   Without requiring providers to be thread-safe, this commit doesn't make 
sense.
   
   Few providers are not thread-safe, like SFTP with a TOCTOU bug. This should 
be fixed by adding a narrow `synchronized`, i.e. not on the whole filesystem, 
only on that one file, to avoid blocking other threads working with other files.
   HDFS is not thread-safe, but is buggy in other ways; its `doAttach()` method 
gets called again and again, without checking if that has been done before 
already.
   The worst that can happen with SFTP and HDFS (the two bad plugins) 
unnecessary duplication of calls.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to