Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change how fastresumes are written to disk #13000

Open
ghost opened this issue Jun 11, 2020 · 2 comments
Open

Change how fastresumes are written to disk #13000

ghost opened this issue Jun 11, 2020 · 2 comments
Labels

Comments

@ghost
Copy link

ghost commented Jun 11, 2020

Please provide the following information

qBittorrent version and Operating System

4.2.5 Win10 (10.0.1xxxx)

What is the problem

Current method to save fastresume is flawed. It allows fastresume corruption pretty easily.

If you don't have adequate space to write the fastresume, it will just write 0 Kb fastresume files.
If you force close qBt when writing fastresumes, it will get corrupted with no backups left.

What is the expected behavior

Write with a different file name, like 9c5b41bae44dcee11db256297a3058f8a6690a7b.fastresume.bak
and if it succeeds, then rename it to 9c5b41bae44dcee11db256297a3058f8a6690a7b.fastresume

Or rename existing one to 9c5b41bae44dcee11db256297a3058f8a6690a7b.fastresume.bak and then write new one 9c5b41bae44dcee11db256297a3058f8a6690a7b.fastresume

I don't think anyone would mind to keep a backup of these 2-3 KiB files.

@coolio2013
Copy link

If you don't have 'adequate space' on your system partition, you are having bigger issues, aren't you? qbt can't really do anything here (writing backups would double the required space and double IO load).

But yes, writing fastresume-files isn't perfect (likely to be forgotten when quitting qbt or left corrupted somehow/not reflecting actual status in older versions).

@sicode
Copy link

sicode commented Jul 31, 2020

agree!

I've also had a hard disk with no space

Missing 1000 + seed file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants