Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Add secondary_directory_servers option to fetch room list from other servers #808
Conversation
dbkr
added some commits
May 31, 2016
dbkr
assigned
NegativeMjark and
erikjohnston
May 31, 2016
dbkr
added some commits
Jun 1, 2016
dbkr
commented on the diff
Jun 1, 2016
synapse/handlers/room.py
| + logger.warn("No cached room list from %s: waiting for fetch", s) | ||
| + wait = True | ||
| + break | ||
| + | ||
| + if wait and self.remote_list_request_cache.get(()): | ||
| + yield self.remote_list_request_cache.get(()) | ||
| + | ||
| + public_rooms = yield self.get_local_public_room_list() | ||
| + | ||
| + # keep track of which room IDs we've seen so we can de-dup | ||
| + room_ids = set() | ||
| + | ||
| + # tag all the ones in our list with our server name. | ||
| + # Also add the them to the de-deping set | ||
| + for room in public_rooms['chunk']: | ||
| + room["server_name"] = self.hs.hostname |
dbkr
Member
|
|
LGTM |
|
LGTM |
dbkr
merged commit 00c487a
into
develop
Jun 1, 2016
8 checks passed
Flake8 + Packaging (Commit)
Build #791 origin/dbkr/room_list_spider succeeded in 29 sec
Details
Flake8 + Packaging (Merged PR)
Build finished.
Details
Sytest Postgres (Commit)
Build #768 origin/dbkr/room_list_spider succeeded in 4 min 20 sec
Details
Sytest Postgres (Merged PR)
Build finished.
Details
Sytest SQLite (Commit)
Build #775 origin/dbkr/room_list_spider succeeded in 3 min 11 sec
Details
Sytest SQLite (Merged PR)
Build finished.
Details
Unit Tests (Commit)
Build #832 origin/dbkr/room_list_spider succeeded in 1 min 29 sec
Details
Unit Tests (Merged PR)
Build finished.
Details
richvdh
deleted the
dbkr/room_list_spider
branch
Dec 1, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dbkr commentedMay 31, 2016
This polls the list of remote servers for their lists every minute, returning the cached results from the last successful fetch (since server restart). If there is no cached result, it will wait for any currently running poll to complete before returning the result.
We probably want an additional cache somewhere to reduce the load from producing the local room list, which I suspect will be a cache of the whole aggregated room list. If so, this probably belongs in a separate PR.