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

Limit concurrent event sends for a room #3079

Merged
merged 3 commits into from
Apr 10, 2018

Conversation

erikjohnston
Copy link
Member

No description provided.

@richvdh
Copy link
Member

richvdh commented Apr 9, 2018

So some explanation of what's going on here would have been helpful, but I think I've figured it out: the idea appears to be to pull the limiter up from create_event into create_and_send_nonmember_event, so that it covers send_nonmember_event as well as create_event (and thus limits the number of events in flight between the event_creator worker and master)?

so, sounds reasonable to me. A comment in create_and_send_nonmember_event as to why the limit is where it is would be useful.

I note that create_event is also called from RoomMemberHandler._local_membership_update and hence (if you keep chasing it back) from RoomMemberHandler.update_membership. However this is already limited to one-member-per-room via the member_linearizer, so there is no concern about the limit being removed on that path?

@richvdh richvdh assigned erikjohnston and unassigned richvdh Apr 9, 2018
@erikjohnston erikjohnston force-pushed the erikj/limit_concurrent_sends branch from a81ff41 to f8e8ec0 Compare April 10, 2018 13:00
@erikjohnston
Copy link
Member Author

I note that create_event is also called from RoomMemberHandler._local_membership_update and hence (if you keep chasing it back) from RoomMemberHandler.update_membership. However this is already limited to one-member-per-room via the member_linearizer, so there is no concern about the limit being removed on that path?

So ideally we'd probably want everything to be incorporated into the limit, but you're right in that I'm not hugely concerned that we don't catch membership events. Its also worth noting that limiting _create_event wasn't particularly useful other than to limit number of concurrent state resolutions.

@erikjohnston erikjohnston assigned richvdh and unassigned erikjohnston Apr 10, 2018
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

lgtm

@richvdh richvdh assigned erikjohnston and unassigned richvdh Apr 10, 2018
@erikjohnston erikjohnston merged commit eaa2ebf into develop Apr 10, 2018
neilisfragile added a commit that referenced this pull request Apr 27, 2018
Changes in synapse v0.28.0-rc1 (2018-04-26)
===========================================

Bug Fixes:

* Fix quarantine media admin API and search reindex (PR #3130)
* Fix media admin APIs (PR #3134)

Changes in synapse v0.28.0-rc1 (2018-04-24)
===========================================

Minor performance improvement to federation sending and bug fixes.

(Note: This release does not include state resolutions discussed in matrix live)

Features:

* Add metrics for event processing lag (PR #3090)
* Add metrics for ResponseCache (PR #3092)

Changes:

* Synapse on PyPy (PR #2760) Thanks to @Valodim!
* move handling of auto_join_rooms to RegisterHandler (PR #2996) Thanks to @krombel!
* Improve handling of SRV records for federation connections (PR #3016) Thanks to @silkeh!
* Document the behaviour of ResponseCache (PR #3059)
* Preparation for py3 (PR #3061, #3073, #3074, #3075, #3103, #3104, #3106, #3107, #3109, #3110) Thanks to @NotAFile!
* update prometheus dashboard to use new metric names (PR #3069) Thanks to @krombel!
* use python3-compatible prints (PR #3074) Thanks to @NotAFile!
* Send federation events concurrently (PR #3078)
* Limit concurrent event sends for a room (PR #3079)
* Improve R30 stat definition (PR #3086)
* Send events to ASes concurrently (PR #3088)
* Refactor ResponseCache usage (PR #3093)
* Clarify that SRV may not point to a CNAME (PR #3100) Thanks to @silkeh!
* Use str(e) instead of e.message (PR #3103) Thanks to @NotAFile!
* Use six.itervalues in some places (PR #3106) Thanks to @NotAFile!
* Refactor store.have_events (PR #3117)

Bug Fixes:

* Return 401 for invalid access_token on logout (PR #2938) Thanks to @dklug!
* Return a 404 rather than a 500 on rejoining empty rooms (PR #3080)
* fix federation_domain_whitelist (PR #3099)
* Avoid creating events with huge numbers of prev_events (PR #3113)
* Reject events which have lots of prev_events (PR #3118)
@erikjohnston erikjohnston deleted the erikj/limit_concurrent_sends branch September 20, 2018 13:58
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