Skip to content

Commit 56a3ff3

Browse files
committed
Merge tag 'v1.85.2' into develop
Synapse 1.85.2 (2023-06-08) =========================== Bugfixes -------- - Fix regression where using TLS for HTTP replication between workers did not work. Introduced in v1.85.0. ([\matrix-org#15746](matrix-org#15746))
2 parents 05c8839 + ac3a70a commit 56a3ff3

File tree

5 files changed

+55
-3
lines changed

5 files changed

+55
-3
lines changed

CHANGES.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
Synapse 1.85.2 (2023-06-08)
2+
===========================
3+
4+
Bugfixes
5+
--------
6+
7+
- Fix regression where using TLS for HTTP replication between workers did not work. Introduced in v1.85.0. ([\#15746](https://github.com/matrix-org/synapse/issues/15746))
8+
9+
10+
Synapse 1.85.1 (2023-06-07)
11+
===========================
12+
13+
Note: this release only fixes a bug that stopped some deployments from upgrading to v1.85.0. There is no need to upgrade to v1.85.1 if successfully running v1.85.0.
14+
15+
Bugfixes
16+
--------
17+
18+
- Fix bug in schema delta that broke upgrades for some deployments. Introduced in v1.85.0. ([\#15738](https://github.com/matrix-org/synapse/issues/15738), [\#15739](https://github.com/matrix-org/synapse/issues/15739))
19+
20+
121
Synapse 1.85.0 (2023-06-06)
222
===========================
323

debian/changelog

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
matrix-synapse-py3 (1.85.2) stable; urgency=medium
2+
3+
* New Synapse release 1.85.2.
4+
5+
-- Synapse Packaging team <[email protected]> Thu, 08 Jun 2023 13:04:18 +0100
6+
7+
matrix-synapse-py3 (1.85.1) stable; urgency=medium
8+
9+
* New Synapse release 1.85.1.
10+
11+
-- Synapse Packaging team <[email protected]> Wed, 07 Jun 2023 10:51:12 +0100
12+
113
matrix-synapse-py3 (1.85.0) stable; urgency=medium
214

315
* New Synapse release 1.85.0.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ manifest-path = "rust/Cargo.toml"
8989

9090
[tool.poetry]
9191
name = "matrix-synapse"
92-
version = "1.85.0"
92+
version = "1.85.2"
9393
description = "Homeserver for the Matrix decentralised comms protocol"
9494
authors = ["Matrix.org Team and Contributors <[email protected]>"]
9595
license = "Apache-2.0"

synapse/http/replicationagent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def endpointForURI(self, uri: URI) -> IStreamClientEndpoint:
7676
endpoint = wrapClientTLS(
7777
# The 'port' argument below isn't actually used by the function
7878
self.context_factory.creatorForNetloc(
79-
self.instance_map[worker_name].host,
79+
self.instance_map[worker_name].host.encode("utf-8"),
8080
self.instance_map[worker_name].port,
8181
),
8282
endpoint,

synapse/storage/schema/main/delta/77/05thread_notifications_backfill.sql

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,27 @@ DELETE FROM background_updates WHERE update_name = 'event_push_backfill_thread_i
2121
-- Overwrite any null thread_id values.
2222
UPDATE event_push_actions_staging SET thread_id = 'main' WHERE thread_id IS NULL;
2323
UPDATE event_push_actions SET thread_id = 'main' WHERE thread_id IS NULL;
24-
UPDATE event_push_summary SET thread_id = 'main' WHERE thread_id IS NULL;
24+
25+
-- Empirically we can end up with entries in the push summary table with both a
26+
-- `NULL` and `main` thread ID, which causes the insert below to fail. We fudge
27+
-- this by deleting any `NULL` rows that have a corresponding `main`.
28+
DELETE FROM event_push_summary AS a WHERE thread_id IS NULL AND EXISTS (
29+
SELECT 1 FROM event_push_summary AS b
30+
WHERE b.thread_id = 'main' AND a.user_id = b.user_id AND a.room_id = b.room_id
31+
);
32+
-- Copy the NULL threads to have a 'main' thread ID.
33+
--
34+
-- Note: Some people seem to have duplicate rows with a `NULL` thread ID, in
35+
-- which case we just fudge it with using MAX of the values. The counts *may* be
36+
-- wrong for such rooms, but a) its an edge case, and b) they'll be fixed when
37+
-- the user reads the room.
38+
INSERT INTO event_push_summary (user_id, room_id, notif_count, stream_ordering, unread_count, last_receipt_stream_ordering, thread_id)
39+
SELECT user_id, room_id, MAX(notif_count), MAX(stream_ordering), MAX(unread_count), MAX(last_receipt_stream_ordering), 'main'
40+
FROM event_push_summary
41+
WHERE thread_id IS NULL
42+
GROUP BY user_id, room_id, thread_id;
43+
44+
DELETE FROM event_push_summary AS a WHERE thread_id IS NULL;
2545

2646
-- Drop the background updates to calculate the indexes used to find null thread_ids.
2747
DELETE FROM background_updates WHERE update_name = 'event_push_actions_thread_id_null';

0 commit comments

Comments
 (0)