mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-16 21:02:19 -04:00
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>
This commit is contained in:
parent
c1d2ce2901
commit
03bccd542b
14 changed files with 369 additions and 172 deletions
|
@ -58,7 +58,7 @@ from synapse.event_auth import (
|
|||
validate_event_for_room_version,
|
||||
)
|
||||
from synapse.events import EventBase
|
||||
from synapse.events.snapshot import EventContext
|
||||
from synapse.events.snapshot import EventContext, UnpersistedEventContextBase
|
||||
from synapse.federation.federation_client import InvalidResponseError, PulledPduInfo
|
||||
from synapse.logging.context import nested_logging_context
|
||||
from synapse.logging.opentracing import (
|
||||
|
@ -426,7 +426,9 @@ class FederationEventHandler:
|
|||
return event, context
|
||||
|
||||
async def check_join_restrictions(
|
||||
self, context: EventContext, event: EventBase
|
||||
self,
|
||||
context: UnpersistedEventContextBase,
|
||||
event: EventBase,
|
||||
) -> None:
|
||||
"""Check that restrictions in restricted join rules are matched
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue