Tribler / tribler

Privacy enhanced BitTorrent client with P2P content discovery
https://www.tribler.org
GNU General Public License v3.0
4.8k stars 444 forks source link

Remote search does not yield any results #7893

Closed xoriole closed 7 months ago

xoriole commented 7 months ago

Running the current main from source with an empty state directory does not show any search results.

In the beginning, there are no peers so it is expected that there are no results. However, even after the peers are discovered, no results from the remote peers are available.

The recent refactoring of PopularityCommunity and RemoteQueryCommunity to ContentDiscoveryCommunity kept the same community ID, so the peers should be discoverable and the results should be available. But, it is not the case which seems like a bug.

To reproduce, the local search needs to be disabled manually from the code (one way is to return empty [] results from /search/local present in database_endpoints.py).

The issue seems platform-independent but tested on Ubuntu.

synctext commented 7 months ago

Wow, that is a very basic feature! Is it helpful to make a test of this to reproduce? Either with mocked remote peer or something else.

xoriole commented 7 months ago

I can reproduce the issue in a test and have a fix in this PR: https://github.com/Tribler/tribler/pull/7896.