-
- Downloads
Add a class UnpersistedEventContext to allow for the batching up of storing state groups (#14675)
* add class UnpersistedEventContext
* modify create new client event to create unpersistedeventcontexts
* persist event contexts after creation
* fix tests to persist unpersisted event contexts
* cleanup
* misc lints + cleanup
* changelog + fix comments
* lints
* fix batch insertion?
* reduce redundant calculation
* add unpersisted event classes
* rework compute_event_context, split into function that returns unpersisted event context and then persists it
* use calculate_context_info to create unpersisted event contexts
* update typing
* $%#^&*
* black
* fix comments and consolidate classes, use attr.s for class
* requested changes
* lint
* requested changes
* requested changes
* refactor to be stupidly explicit
* clearer renaming and flow
* make partial state non-optional
* update docstrings
---------
Co-authored-by:
Erik Johnston <erik@matrix.org>
Showing
- changelog.d/14675.misc 1 addition, 0 deletionschangelog.d/14675.misc
- synapse/events/snapshot.py 170 additions, 4 deletionssynapse/events/snapshot.py
- synapse/events/third_party_rules.py 4 additions, 2 deletionssynapse/events/third_party_rules.py
- synapse/handlers/federation.py 39 additions, 20 deletionssynapse/handlers/federation.py
- synapse/handlers/federation_event.py 4 additions, 2 deletionssynapse/handlers/federation_event.py
- synapse/handlers/message.py 27 additions, 15 deletionssynapse/handlers/message.py
- synapse/state/__init__.py 71 additions, 105 deletionssynapse/state/__init__.py
- tests/handlers/test_user_directory.py 3 additions, 1 deletiontests/handlers/test_user_directory.py
- tests/rest/admin/test_user.py 3 additions, 1 deletiontests/rest/admin/test_user.py
- tests/storage/test_redaction.py 18 additions, 6 deletionstests/storage/test_redaction.py
- tests/storage/test_state.py 3 additions, 1 deletiontests/storage/test_state.py
- tests/test_utils/event_injection.py 6 additions, 1 deletiontests/test_utils/event_injection.py
- tests/test_visibility.py 6 additions, 3 deletionstests/test_visibility.py
- tests/utils.py 4 additions, 1 deletiontests/utils.py
Loading
Please register or sign in to comment