mirror of
https://github.com/element-hq/synapse
synced 2024-09-29 14:42:42 +00:00
Merge branch 'madlittlemods/fix-and-tests-for-get_last_event_in_room_before_stream_ordering' into madlittlemods/msc3575-sliding-sync-sort
Conflicts: synapse/storage/databases/main/stream.py tests/storage/test_stream.py
This commit is contained in:
commit
03547b09e3
3 changed files with 3 additions and 4 deletions
1
changelog.d/17295.bugfix
Normal file
1
changelog.d/17295.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fix edge case in `/sync` returning the wrong the state when using sharded event persisters.
|
|
@ -931,8 +931,6 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore):
|
|||
# ordering of the operand queries but there is no actual gurantee that it
|
||||
# has this behavior in all scenarios so we need the extra `ORDER BY` at the
|
||||
# bottom.
|
||||
#
|
||||
# We're using the subquery syntax for SQLite compatibility.
|
||||
sql = """
|
||||
SELECT * FROM (
|
||||
SELECT instance_name, stream_ordering, topological_ordering, event_id
|
||||
|
|
|
@ -468,7 +468,7 @@ class GetLastEventInRoomBeforeStreamOrderingTestCase(HomeserverTestCase):
|
|||
self.assertEqual(
|
||||
last_event,
|
||||
event_response3["event_id"],
|
||||
f"We expected {event_response3["event_id"]} but saw {last_event} which corresponds to"
|
||||
f"We expected {event_response3['event_id']} but saw {last_event} which corresponds to "
|
||||
+ str(
|
||||
{
|
||||
"event1": event_response1["event_id"],
|
||||
|
@ -526,7 +526,7 @@ class GetLastEventInRoomBeforeStreamOrderingTestCase(HomeserverTestCase):
|
|||
self.assertEqual(
|
||||
last_event,
|
||||
event_response2["event_id"],
|
||||
f"We expected {event_response2["event_id"]} but saw {last_event} which corresponds to"
|
||||
f"We expected {event_response2['event_id']} but saw {last_event} which corresponds to "
|
||||
+ str(
|
||||
{
|
||||
"event1": event_response1["event_id"],
|
||||
|
|
Loading…
Reference in a new issue