This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add admin API to get some information about federation status #11407
Add admin API to get some information about federation status #11407
Changes from 10 commits
e13af5c
3c9cd10
003028c
d9d469e
19d0459
8175dcc
4d966e7
be1f889
7bd0c47
c77a10f
6cc6a26
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't sound very stable to me to use as the initial sorting / pagination scheme. This might not matter usually, but is something to note.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason for this default sorting is the performances / indexes. All other columns have no indexes. The idea is not to generate a high load by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of questions:
Sorry---I appreciate that some of these questions are about how Synapse itself works, rather than this API. But I think they're the kind of thing that'd be useful to consider in the documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few answers:
Every federated server should be in the list.
synapse/synapse/storage/databases/main/transactions.py
Lines 368 to 369 in 2b82ec4
Yes.
synapse/synapse/storage/databases/main/transactions.py
Lines 203 to 204 in 2b82ec4
Yes.
I don't know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this might be served better by a separate endpoint for querying the status of one specific destination?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future, an API for a single destination can certainly be added. However, the aim is to design the API in a similar way like rooms or users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @DMRobertson that this sounds like it should be a separate API, maybe
/federation/destinations/{destination}$
? That feels like the way rooms are handled currently.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had in mind the use cases #7982 (comment) outlined here.
But I don't mind there being a generic means to answer "what's the state of federation on my homeserver?", and this seems like a start to that. It's flagged as
experimental and "subject to change"
in the docs so I think we should get this in, see if it's helpful to people and iterate from there.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not easy for me to work on it. Information on the subject is hard to find.