qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
28.33k stars 3.98k forks source link

qbittorrent starts rechecking all torrents if started with unavailable NAS shares, there downloaded files reside upon NAS availability restored #11015

Open Koguni31 opened 5 years ago

Koguni31 commented 5 years ago

Please provide the following information

qBittorrent version and Operating System

4.1.5 x64, Windows 10 4.3.3 x64, Windows 10 4.3.4.1 x64, Windows 10

(10.0.1xxxx)

If on linux, libtorrent and Qt version

(type here)

What is the problem

qbittorrent starts and changes to errored state some completed torrents if started with unavailable Samba NAS shares (UNC path), there downloaded files reside.

Then, upon NAS (and torrent files) availability restored, errored state doesn't cleared. If errored torrents resumed, qbittorrent starts rechecking that torrents, it could be some terabytes of unneeded rechecking. Found no reason why some torrents go to errored state and other don't.

What is the expected behavior

Do not check completed or paused torrents files existence and do not perform torrent state change until they resumed or forcibly rechecked by user UI interaction.

Steps to reproduce

(type here)

Extra info(if any)

(type here)

vparitskiy commented 5 years ago

Very annoying indeed

Koguni31 commented 3 years ago

It's still here (4.3.3) and truly is very annoying.

Koguni31 commented 3 years ago

4.3.4.1 and bug still here.

xavier2k6 commented 3 years ago

@glassez ping

glassez commented 3 years ago

qbittorrent starts and changes to errored state some completed torrents if started with unavailable Samba NAS shares (UNC path), there downloaded files reside.

What "errored state" do you mean? Maybe "missing files" state?

Then, upon NAS (and torrent files) availability restored, errored state doesn't cleared.

"Missing files" state isn't cleared automatically yet.

If errored torrents resumed, qbittorrent starts rechecking that torrents, it could be some terabytes of unneeded rechecking.

If you resume "missing files" torrent it shouldn't recheck anything. It either leaves in "missing files" state if files are still unavailable or restores previous progress otherwise.

I talk about latest qBittorrent version. I described the intended behavior. Of course, there may be bugs. I'd rather see screenshots of what it actually looks like when you run it with inaccessible storage, to make sure we're talking about the same things, and not confuse the terminology.

Koguni31 commented 3 years ago

What "errored state" do you mean? Maybe "missing files" state?

At least, "Errored: The network path was not found" state.

If you resume "missing files" torrent it shouldn't recheck anything. It either leaves in "missing files" state if files are still unavailable or restores previous progress otherwise.

I don't know what will happen with 'missing files' state, I only remove or move torrent files with qbittorrent "Delete" or "Set Location". Missing files seems should happen in case when NAS is available, but files were deleted, moved or renamed with 3rd party application (like file explorer). That's not the case.

But 'Errored: The Network path was not found' files are stably rechecked on restored NAS availability on current version (4.3.4.1). One time it could end in rechecking only active torrents, another time - all torrents with files on NAS, next time - some set of torrents only.

Have successfully reproduced few minutes ago:

  1. Exited qbittorrent,
  2. Disconnected NAS from network (removed jack from switch socket),
  3. Started qbittorrent,
  4. Got "Errored: ..." state on all NAS hosted torrents,
  5. Restored NAS connectivity and checked that Windows see folders and files,
  6. Resumed all errored torrents ("Resume" button).

Result: All torrents with files on NAS are re-checking right now one by one. Approximately 5TB of read operations and HDD wear without any reasonable reason this time.

(4): qbt_1_01

(6): qbt_1_02 qbt_1_03

Also, I'll try to disconnect and restore NAS connectivity during qbittorrent operation, without correct exit after current recheck will finish.

glassez commented 3 years ago

Seems it behaves differently if network storage is disconnected when qBittorrent startup unlike disconnected external storage. @arvidn, can you clarify?

luzpaz commented 1 year ago

ping @arvidn

wang-0201 commented 11 months ago

Recently when i use 4.4.5 and 4.6.1(qt6 and not lt2o) qbittorrent on windows.Some torrents was save on my NAS(smb on qnap).Because of one disk offline,i shutdown my NAS and reboot my windows pc.After i open qbittorrent,all torrents need checking,but these checking couldn't continue. I guess qbittorrent checking file without timeout mechanism, even if don't connect on smb server, the torrnets still keep waiting.I had to delete these torrents,then qbittorrent can checking other torrents where those file save in local.