Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add secondary_directory_servers option to fetch room list from other servers #808

Merged
merged 9 commits into from
Jun 1, 2016

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented May 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.

dbkr added 3 commits June 1, 2016 09:48
Otherwise it tries to start the remote public room list updating looping call which breaks.
# 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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this actually necessary or is it, by definition, the domain part of the published alias?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not all published rooms will have aliases, and even those that do may have aliases from servers other than the server (e.g., you can have a single room being published to multiple lists)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, of course :)

@erikjohnston
Copy link
Member

LGTM

1 similar comment
@NegativeMjark
Copy link
Contributor

LGTM

@dbkr dbkr merged commit 00c487a into develop Jun 1, 2016
@richvdh richvdh deleted the dbkr/room_list_spider branch December 1, 2016 14:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants