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

GigaChannel Manager can't restore the personal channel in some cases #4637

Closed
ichorid opened this issue Jun 26, 2019 · 0 comments · Fixed by #7726
Closed

GigaChannel Manager can't restore the personal channel in some cases #4637

ichorid opened this issue Jun 26, 2019 · 0 comments · Fixed by #7726

Comments

@ichorid
Copy link
Contributor

ichorid commented Jun 26, 2019

On startup, GigaChannel Manager checks for the existence of personal channel download. If it does not exist, it will restart it. Unfortunately, Libtorrent Wrapper starts downloads asynchronously, so there is a race condition between these two processes. If GigaChannel Manager wins the race, it will re-download the personal channel download.

EDIT:
Apparently, the problem is not that GigaChannel Manager can't resume the seeding. It is that it can't handle some broken configurations of the DB-torrent-files mutual state.

In general, we have 4 different states that should all be consistent with each other for the system to operate:
1 Personal channel state in the DB: Channel entry, it's state, timestamp, local version, contents states, etc.
2 Channel dir with mdblob files on disk: the dir, the blobs.
3 Channel torrent file and mdblob on disk (used as a backup and for manual sharing).
4 Torrents handled by libtorrent wrapper: .state files, etc.

It is generally very hard to tell if one of these is not consistent with the others since complete consistency checks are very costly. So, we can't do the checks at the Tribler startup or at any other user-induced action. One solution to this problem would be to create a periodic checker process that will do the "maintenance", say, once a day. Another possibility is to add a "Check consistency" button to the Settings screen, so users can initiate the check on their own.

@ichorid ichorid added this to the V7.3: Gigachannels milestone Jun 26, 2019
@ichorid ichorid self-assigned this Jun 26, 2019
@ichorid ichorid changed the title GigaChannel Manager restarts personal channel download each time Tribler starts GigaChannel Manager can't restore the personal channel in some cases Jul 5, 2019
@drew2a drew2a modified the milestones: Next-next release, Backlog Sep 15, 2021
@ichorid ichorid removed their assignment Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants