Skip to content
This repository was archived by the owner on Nov 25, 2024. It is now read-only.

Move high level room joining logic to GMSL #3065

Merged
merged 18 commits into from
Apr 27, 2023
Merged

Move high level room joining logic to GMSL #3065

merged 18 commits into from
Apr 27, 2023

Conversation

devonh
Copy link
Collaborator

@devonh devonh commented Apr 24, 2023

@devonh devonh requested a review from a team as a code owner April 24, 2023 23:47
@codecov
Copy link

codecov bot commented Apr 25, 2023

Codecov Report

Patch coverage: 51.78% and no project coverage change.

Comparison is base (ed19efc) 66.70% compared to head (27cd8c9) 66.71%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3065   +/-   ##
=======================================
  Coverage   66.70%   66.71%           
=======================================
  Files         495      495           
  Lines       53559    53473   -86     
=======================================
- Hits        35727    35673   -54     
+ Misses      14186    14167   -19     
+ Partials     3646     3633   -13     
Flag Coverage Δ
unittests 47.11% <51.78%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
federationapi/api/api.go 100.00% <ø> (ø)
federationapi/internal/federationclient.go 48.88% <45.83%> (-1.54%) ⬇️
federationapi/internal/perform.go 42.15% <56.25%> (-6.87%) ⬇️

... and 29 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@kegsay kegsay left a comment

Choose a reason for hiding this comment

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

Pending GMSL changes.

) (res gomatrixserverlib.SendJoinResponse, err error) {
ctx, cancel := context.WithTimeout(ctx, defaultTimeout)
defer cancel()
ires, err := a.doRequestIfNotBlacklisted(s, func() (interface{}, error) {
Copy link
Member

Choose a reason for hiding this comment

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

I like this but the behaviour in the following situation feels wrong:

  • Server X is blacklisted.
  • Server X comes back online but Dendrite doesn't know it yet.
  • User wants to join a room via Server X.
  • Blacklist says no.
  • Dendrite marks that as a failure (Reachable=false), reinforcing the blacklist.

I don't know the full implications of this. If reinforcing the blacklist is a no-op then fine, but if it resets the timer or something then I can see this being a problem. The specification is silent on how best to handle blacklists, because after all we don't want to waste time sending requests to dead servers. However, the spec is particularly unclear on which endpoints should be considered "unblacklistable" - i.e always try them to see if the server is now up. We will unblacklist when the remote server sends us something (I hope hope hope) but that may be at some indeterminate point in the future.

The safest option would be to preserve the original implementation and don't check the blacklist. Longer term, we need to take a holistic view of this and figure out a way forward.

@devonh devonh merged commit dd5e47a into main Apr 27, 2023
@devonh devonh deleted the devon/move-join branch April 27, 2023 00:43
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.

2 participants