mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-07 02:24:12 -04:00
Remove groups replication code. (#12900)
The replication logic for groups is no longer used, so the message passing infrastructure can be removed.
This commit is contained in:
parent
2fc787c341
commit
cf05258f76
7 changed files with 1 additions and 90 deletions
|
@ -30,7 +30,6 @@ from synapse.replication.tcp.protocol import ClientReplicationStreamProtocol
|
|||
from synapse.replication.tcp.streams import (
|
||||
AccountDataStream,
|
||||
DeviceListsStream,
|
||||
GroupServerStream,
|
||||
PushersStream,
|
||||
PushRulesStream,
|
||||
ReceiptsStream,
|
||||
|
@ -185,10 +184,6 @@ class ReplicationDataHandler:
|
|||
self.notifier.on_new_event(
|
||||
StreamKeyType.DEVICE_LIST, token, rooms=all_room_ids
|
||||
)
|
||||
elif stream_name == GroupServerStream.NAME:
|
||||
self.notifier.on_new_event(
|
||||
"groups_key", token, users=[row.user_id for row in rows]
|
||||
)
|
||||
elif stream_name == PushersStream.NAME:
|
||||
for row in rows:
|
||||
if row.deleted:
|
||||
|
|
|
@ -29,7 +29,6 @@ from synapse.replication.tcp.streams._base import (
|
|||
BackfillStream,
|
||||
CachesStream,
|
||||
DeviceListsStream,
|
||||
GroupServerStream,
|
||||
PresenceFederationStream,
|
||||
PresenceStream,
|
||||
PushersStream,
|
||||
|
@ -61,7 +60,6 @@ STREAMS_MAP = {
|
|||
FederationStream,
|
||||
TagAccountDataStream,
|
||||
AccountDataStream,
|
||||
GroupServerStream,
|
||||
UserSignatureStream,
|
||||
)
|
||||
}
|
||||
|
@ -81,6 +79,5 @@ __all__ = [
|
|||
"ToDeviceStream",
|
||||
"TagAccountDataStream",
|
||||
"AccountDataStream",
|
||||
"GroupServerStream",
|
||||
"UserSignatureStream",
|
||||
]
|
||||
|
|
|
@ -585,26 +585,6 @@ class AccountDataStream(Stream):
|
|||
return updates, to_token, limited
|
||||
|
||||
|
||||
class GroupServerStream(Stream):
|
||||
@attr.s(slots=True, frozen=True, auto_attribs=True)
|
||||
class GroupsStreamRow:
|
||||
group_id: str
|
||||
user_id: str
|
||||
type: str
|
||||
content: JsonDict
|
||||
|
||||
NAME = "groups"
|
||||
ROW_TYPE = GroupsStreamRow
|
||||
|
||||
def __init__(self, hs: "HomeServer"):
|
||||
store = hs.get_datastores().main
|
||||
super().__init__(
|
||||
hs.get_instance_name(),
|
||||
current_token_without_instance(store.get_group_stream_token),
|
||||
store.get_all_groups_changes,
|
||||
)
|
||||
|
||||
|
||||
class UserSignatureStream(Stream):
|
||||
"""A user has signed their own device with their user-signing key"""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue