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

Commit 0ba4de6

Browse files
committed
Merge remote-tracking branch 'origin/develop' into erikj/better_return_type
2 parents bd6e404 + 6a8310f commit 0ba4de6

File tree

17 files changed

+418
-134
lines changed

17 files changed

+418
-134
lines changed

changelog.d/14435.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix a long-standing bug where a device list update might not be sent to clients in certain circumstances.

changelog.d/14473.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Faster remote room joins: stream the un-partial-stating of rooms over replication.

changelog.d/14600.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Suppress a spurious warning when `POST /rooms/<room_id>/<membership>/`, `POST /join/<room_id_or_alias`, or the unspecced `PUT /join/<room_id_or_alias>/<txn_id>` receive an empty HTTP request body.

changelog.d/14619.doc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add new `push.enabled` config option to allow opting out of push notification calculation.

docs/usage/configuration/config_documentation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3355,7 +3355,7 @@ Configuration settings related to push notifications
33553355
This setting defines options for push notifications.
33563356

33573357
This option has a number of sub-options. They are as follows:
3358-
* `enable_push`: Enables or disables push notification calculation. Note, disabling this will also
3358+
* `enabled`: Enables or disables push notification calculation. Note, disabling this will also
33593359
stop unread counts being calculated for rooms. This mode of operation is intended
33603360
for homeservers which may only have bots or appservice users connected, or are otherwise
33613361
not interested in push/unread counters. This is enabled by default.
@@ -3379,7 +3379,7 @@ This option has a number of sub-options. They are as follows:
33793379
Example configuration:
33803380
```yaml
33813381
push:
3382-
enable_push: true
3382+
enabled: true
33833383
include_content: false
33843384
group_unread_count_by_room: false
33853385
```

poetry.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ pyasn1 = ">=0.1.9"
141141
pyasn1-modules = ">=0.0.7"
142142
bcrypt = ">=3.1.7"
143143
Pillow = ">=5.4.0"
144-
sortedcontainers = ">=1.4.4"
144+
# We use SortedDict.peekitem(), which was added in sortedcontainers 1.5.2.
145+
sortedcontainers = ">=1.5.2"
145146
pymacaroons = ">=0.13.0"
146147
msgpack = ">=0.5.2"
147148
phonenumbers = ">=8.2.0"

synapse/handlers/device.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,7 @@ async def incoming_device_list_update(
996996
# Check if we are partially joining any rooms. If so we need to store
997997
# all device list updates so that we can handle them correctly once we
998998
# know who is in the room.
999-
# TODO(faster joins): this fetches and processes a bunch of data that we don't
999+
# TODO(faster_joins): this fetches and processes a bunch of data that we don't
10001000
# use. Could be replaced by a tighter query e.g.
10011001
# SELECT EXISTS(SELECT 1 FROM partial_state_rooms)
10021002
partial_rooms = await self.store.get_partial_state_room_resync_info()

synapse/handlers/federation.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ def __init__(self, hs: "HomeServer"):
152152
self._federation_event_handler = hs.get_federation_event_handler()
153153
self._device_handler = hs.get_device_handler()
154154
self._bulk_push_rule_evaluator = hs.get_bulk_push_rule_evaluator()
155+
self._notifier = hs.get_notifier()
155156

156157
self._clean_room_for_join_client = ReplicationCleanRoomRestServlet.make_client(
157158
hs
@@ -1692,6 +1693,9 @@ async def _sync_partial_state_room(
16921693
self._storage_controllers.state.notify_room_un_partial_stated(
16931694
room_id
16941695
)
1696+
# Poke the notifier so that other workers see the write to
1697+
# the un-partial-stated rooms stream.
1698+
self._notifier.notify_replication()
16951699

16961700
# TODO(faster_joins) update room stats and user directory?
16971701
# https://github.com/matrix-org/synapse/issues/12814

synapse/replication/tcp/streams/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
)
4343
from synapse.replication.tcp.streams.events import EventsStream
4444
from synapse.replication.tcp.streams.federation import FederationStream
45+
from synapse.replication.tcp.streams.partial_state import UnPartialStatedRoomStream
4546

4647
STREAMS_MAP = {
4748
stream.NAME: stream
@@ -61,6 +62,7 @@
6162
TagAccountDataStream,
6263
AccountDataStream,
6364
UserSignatureStream,
65+
UnPartialStatedRoomStream,
6466
)
6567
}
6668

@@ -80,4 +82,5 @@
8082
"TagAccountDataStream",
8183
"AccountDataStream",
8284
"UserSignatureStream",
85+
"UnPartialStatedRoomStream",
8386
]

0 commit comments

Comments
 (0)