airdcpp-web / airdcpp-webclient

Communal peer-to-peer file sharing application for file servers/NAS devices
https://airdcpp-web.github.io
175 stars 32 forks source link

Better management of network disk drive #331

Closed Kcchouette closed 5 years ago

Kcchouette commented 5 years ago

Current UI and client versions:

Application version: AirDC++w 2.6.1 x86_64 Web UI version: 2.6.1

Operating system:

Debian 9

Steps to reproduce the issue:

Having a network disk drive. Adding it to your share. Airdcpp tries to access twice to the file when hashing (two different open of the file in two different methods?). The file is so downloaded twice.

What I'm waiting to have

Having one download of the file, so only one access to the file.

maksis commented 5 years ago

The file is so downloaded twice.

How did you check this? Accessing the file twice doesn't mean that the whole file is being downloaded twice.

Kcchouette commented 5 years ago

I've created a fuse application. "open" means "download the file from the distant access to have the file in your tmp folder". Airdcpp tries to open the file twice when hashing, here some debug trace:

OPEN: /test/file1.mp3 # so download the file: /test/file1.mp3
OPEN: /test/file1.mp3 # so download the file: /test/file1.mp3
READ: /test/file1.mp3 size: 131072 offset: 0
[...]
RELEASE: /test/file1.mp3 # so remove the file: /test/file1.mp3 from the tmp folder
RELEASE: /test/file1.mp3 # so remove the file: /test/file1.mp3 from the tmp folder
maksis commented 5 years ago

What kind of network disk is that...? Downloading the whole file only because it's being opened (but nothing is being read from it) doesn't sound very clever.

maksis commented 5 years ago

As the author of the issue seems to be using a self-made file system, it's rather the file system than the application that should be changed to handle such cases in a better way. Opening a file doesn't cause the whole file to be downloaded with normal network file systems, so I see no issues in the way how the application works at the moment.