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

Commit

Permalink
Merge tag 'v1.62.0rc3' into develop
Browse files Browse the repository at this point in the history
Synapse 1.62.0rc3 (2022-07-04)
==============================

Bugfixes
--------

- Update the version of the [ldap3 plugin](/~https://github.com/matrix-org/matrix-synapse-ldap3/) included in the `matrixdotorg/synapse` DockerHub images and the Debian packages hosted on `packages.matrix.org` to 0.2.1. This fixes [a bug](matrix-org/matrix-synapse-ldap3#163) with usernames containing uppercase characters. ([\#13156](#13156))
- Fix a bug introduced in Synapse 1.62.0rc1 affecting unread counts for users on small servers. ([\#13168](#13168))
  • Loading branch information
anoadragon453 committed Jul 4, 2022
2 parents 9820665 + 95a260d commit 6180e1b
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 12 deletions.
10 changes: 10 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
Synapse 1.62.0rc3 (2022-07-04)
==============================

Bugfixes
--------

- Update the version of the [ldap3 plugin](/~https://github.com/matrix-org/matrix-synapse-ldap3/) included in the `matrixdotorg/synapse` DockerHub images and the Debian packages hosted on `packages.matrix.org` to 0.2.1. This fixes [a bug](/~https://github.com/matrix-org/matrix-synapse-ldap3/pull/163) with usernames containing uppercase characters. ([\#13156](/~https://github.com/matrix-org/synapse/issues/13156))
- Fix a bug introduced in Synapse 1.62.0rc1 affecting unread counts for users on small servers. ([\#13168](/~https://github.com/matrix-org/synapse/issues/13168))


Synapse 1.62.0rc2 (2022-07-01)
==============================

Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
matrix-synapse-py3 (1.62.0~rc3) stable; urgency=medium

* New Synapse release 1.62.0rc3.

-- Synapse Packaging team <packages@matrix.org> Mon, 04 Jul 2022 16:07:01 +0100

matrix-synapse-py3 (1.62.0~rc2) stable; urgency=medium

* New Synapse release 1.62.0rc2.
Expand Down
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ skip_gitignore = true

[tool.poetry]
name = "matrix-synapse"
version = "1.62.0rc2"
version = "1.62.0rc3"
description = "Homeserver for the Matrix decentralised comms protocol"
authors = ["Matrix.org Team and Contributors <packages@matrix.org>"]
license = "Apache-2.0"
Expand Down
9 changes: 7 additions & 2 deletions synapse/storage/databases/main/event_push_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,12 @@ def _rotate_notifs_txn(self, txn: LoggingTransaction) -> bool:
stream_row = txn.fetchone()
if stream_row:
(offset_stream_ordering,) = stream_row
rotate_to_stream_ordering = offset_stream_ordering

# We need to bound by the current token to ensure that we handle
# out-of-order writes correctly.
rotate_to_stream_ordering = min(
offset_stream_ordering, self._stream_id_gen.get_current_token()
)
caught_up = False
else:
rotate_to_stream_ordering = self._stream_id_gen.get_current_token()
Expand Down Expand Up @@ -1014,7 +1019,7 @@ def _rotate_notifs_before_txn(
SELECT user_id, room_id, count(*) as cnt,
max(stream_ordering) as stream_ordering
FROM event_push_actions
WHERE ? <= stream_ordering AND stream_ordering < ?
WHERE ? < stream_ordering AND stream_ordering <= ?
AND %s = 1
GROUP BY user_id, room_id
) AS upd
Expand Down
10 changes: 5 additions & 5 deletions tests/storage/test_event_push_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,12 @@ def _mark_read(stream: int, depth: int) -> None:
_assert_counts(0, 0)
_inject_actions(1, PlAIN_NOTIF)
_assert_counts(1, 0)
_rotate(2)
_rotate(1)
_assert_counts(1, 0)

_inject_actions(3, PlAIN_NOTIF)
_assert_counts(2, 0)
_rotate(4)
_rotate(3)
_assert_counts(2, 0)

_inject_actions(5, PlAIN_NOTIF)
Expand All @@ -164,7 +164,7 @@ def _mark_read(stream: int, depth: int) -> None:
_assert_counts(0, 0)

_inject_actions(6, PlAIN_NOTIF)
_rotate(7)
_rotate(6)
_assert_counts(1, 0)

self.get_success(
Expand All @@ -180,13 +180,13 @@ def _mark_read(stream: int, depth: int) -> None:

_inject_actions(8, HIGHLIGHT)
_assert_counts(1, 1)
_rotate(9)
_rotate(8)
_assert_counts(1, 1)

# Check that adding another notification and rotating after highlight
# works.
_inject_actions(10, PlAIN_NOTIF)
_rotate(11)
_rotate(10)
_assert_counts(2, 1)

# Check that sending read receipts at different points results in the
Expand Down

0 comments on commit 6180e1b

Please sign in to comment.