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

Content appearing and disappearing when refreshing a channel #6395

Closed
devos50 opened this issue Sep 30, 2021 · 4 comments · Fixed by #7726
Closed

Content appearing and disappearing when refreshing a channel #6395

devos50 opened this issue Sep 30, 2021 · 4 comments · Fixed by #7726

Comments

@devos50
Copy link
Contributor

devos50 commented Sep 30, 2021

I noticed that when going to a channel in Tribler and refreshing it by clicking on the channel name in the breadcrumb navigator, sometimes content appears and disappears. While this is expected (since Tribler can discover new content), sometimes the amount of content is changing significantly. Note that it requires like 20+ or 30+ refreshes sometimes to trigger this behavior.

Below are two screenshots that were taken within the same channel. Refreshing it occasionally gives different content. Note that sometimes, item A in the first screenshot is not present in screenshot B, hinting that this might be a bug somewhere.

Schermafbeelding 2021-09-30 om 12 20 01

Schermafbeelding 2021-09-30 om 12 20 06

@ichorid
Copy link
Contributor

ichorid commented Oct 7, 2021

Reproduced it locally. #6415 does not fix the problem completely, but greatly reduces the probability of triggering it.

The problem is threefold:

  1. There is no integrity/versioning control for preview channel entries neither in the local channels DB nor when querying for channels remotely
  2. The local list of remote peers serving the channel does not account for channel versions
  3. The local list of remote peers is cycled based on what peer was seen last

As a result, after 10-30 refreshes we may connect to a peer serving an outdated (or even broken!) version of a channel. Or even get a timeout and show the local cache, which could contain duplicates and deleted folders, etc.

There is no real way to fix it in Channels 2.0 architecture, but we can still alleviate the problem by adding better methods for selecting remote peers, for instance:

  • filtering based on channel version - only serve from peers that got the version that is up to date with our version
  • note the service time for each request and prioritize peers that have better latency (comparing the latency for the same query)

@devos50
Copy link
Contributor Author

devos50 commented Oct 7, 2021

I have the impression that #6415 even makes it easier to reproduce. Anyway, in like 20 refreshes of one of the most popular channels in Tribler, I get random content in like 5 refreshes.

@ichorid
Copy link
Contributor

ichorid commented Oct 7, 2021

I had to click it about 20-30 times to get to see the thing 🤷 . I guess it is highly dependent on network and PC performance.

@ichorid
Copy link
Contributor

ichorid commented Oct 27, 2021

This is a result of remote hosts providing an older version of the channel through the remote preview system. Currently, the remote preview system does not filter remote preview sources by version. We are facing a dilemma here: if we add such filtering we may make reduce channel previews availability, because peers with older versions of a channel will not be considered as legitimate sources for channel preview.
Example:
Local channel version: 100 (not subscribed)
Host A channel version: 99
Host B channel version: 100

Currently, both A and B can be selected as the preview source.

If we enable filtering of preview sources by channel version, only host B will be considered as a legitimate source.

Should we do so?

@drew2a drew2a modified the milestones: 7.11.0 October, 7.12.0 December Nov 1, 2021
@drew2a drew2a modified the milestones: 7.12.0, 7.13.0 Oct 14, 2022
@drew2a drew2a removed this from the 7.13.0 milestone Nov 7, 2022
@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.

3 participants