Skip to content

feat(categories): debounce writes, repair from AutoTMM code.#23160

Open
KyleSanderson wants to merge 10 commits intoqbittorrent:masterfrom
KyleSanderson:feat/session
Open

feat(categories): debounce writes, repair from AutoTMM code.#23160
KyleSanderson wants to merge 10 commits intoqbittorrent:masterfrom
KyleSanderson:feat/session

Conversation

@KyleSanderson
Copy link

Repairs from AutoTMM torrents when categories are corrupt. Please feel free to edit / commit to / and or create another PR based on this.

@KyleSanderson
Copy link
Author

This should be ready again, I believe I have bikeshedded this to death.

@KyleSanderson
Copy link
Author

@glassez this isn't a 5.1 problem like I first thought it was, I just had this corruption happen again on 5.0. Is there anything else I can do with this PR to get this corruption issue resolved.

@glassez
Copy link
Member

glassez commented Oct 2, 2025

@KyleSanderson
Could you describe the problem and how do you solve it in this PR? I would like to understand your intentions before I can review the code.

@KyleSanderson
Copy link
Author

@KyleSanderson Could you describe the problem and how do you solve it in this PR? I would like to understand your intentions before I can review the code.

categories.json is written to entirely every single category change, there is no locking on this from what I could see. Additionally, when categories.json is corrupt, restore the save_path from the torrent information, if such data still exists. Right now it just recreates the categories, moving thousands of torrents to the category name as opposed to the save_path that was there.

@glassez
Copy link
Member

glassez commented Oct 3, 2025

@KyleSanderson
They look like two different issues:

  1. categories.json is written to entirely every single category change
  2. when categories.json is corrupt, restore the save_path from the torrent information, if such data still exists

So I believe this PR should be decoupled into two ones in order to improve their further reviewing and understanding.

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

This PR is stale because it has been 60 days with no activity. This PR will be automatically closed within 7 days if there is no further activity.

@github-actions github-actions bot added the Stale label Dec 3, 2025
@KyleSanderson
Copy link
Author

Still fixes the rampant corruption the category race condition code has.

@github-actions github-actions bot removed the Stale label Dec 4, 2025
@glassez
Copy link
Member

glassez commented Dec 4, 2025

Still fixes the rampant corruption the category race condition code has.

So would you mind to decouple it into two PRs in order to improve their further reviewing and understanding as was suggested above?

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

This PR is stale because it has been 60 days with no activity. This PR will be automatically closed within 7 days if there is no further activity.

@github-actions github-actions bot added the Stale label Feb 3, 2026
@KyleSanderson
Copy link
Author

.

@github-actions github-actions bot removed the Stale label Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants