-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add stream_ordering
sort to Sliding Sync /sync
#17293
Add stream_ordering
sort to Sliding Sync /sync
#17293
Commits on Jun 10, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ce45cc1 - Browse repository at this point
Copy the full SHA ce45cc1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 75b701f - Browse repository at this point
Copy the full SHA 75b701fView commit details
Commits on Jun 11, 2024
-
See #17293 (comment) > FWIW I mildly prefer the styling `? < a AND a <= ?` as then my brain can more easily convert that to `a in (?...?]`
Configuration menu - View commit details
-
Copy full SHA for c8a240f - Browse repository at this point
Copy the full SHA c8a240fView commit details
Commits on Jun 12, 2024
-
Fix
get_last_event_in_room_before_stream_ordering(...)
not finding ……the last event Previously, it would use the event with the lowest `stream_ordering` that was fetched (we want the highest `stream_ordering. `union` does not work how you might think at first and does not preserve the ordering of the operand queries. `union all` also doesn't necessarily have that gurantee but it does behave that way. See https://dba.stackexchange.com/questions/316818/are-results-from-union-all-clauses-always-appended-in-order/316835#316835
Configuration menu - View commit details
-
Copy full SHA for 2a82ac0 - Browse repository at this point
Copy the full SHA 2a82ac0View commit details -
Add actual guranteed order for UNION
We use `union all` because we don't need any of the deduplication logic (`union` is really a union + distinct). `UNION ALL`` does preserve the 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. See https://dba.stackexchange.com/questions/316818/are-results-from-union-all-clauses-always-appended-in-order/316835#316835
Configuration menu - View commit details
-
Copy full SHA for 2e1d142 - Browse repository at this point
Copy the full SHA 2e1d142View commit details -
Configuration menu - View commit details
-
Copy full SHA for b1af992 - Browse repository at this point
Copy the full SHA b1af992View commit details -
Configuration menu - View commit details
-
Copy full SHA for 901ce62 - Browse repository at this point
Copy the full SHA 901ce62View commit details -
Fix
get_last_event_in_room_before_stream_ordering(...)
not finding ……the last event Previously, it would use the event with the lowest `stream_ordering` that was fetched (we want the highest `stream_ordering. `union` does not work how you might think at first and does not preserve the ordering of the operand queries. `union all` also doesn't necessarily have that gurantee but it does behave that way. See https://dba.stackexchange.com/questions/316818/are-results-from-union-all-clauses-always-appended-in-order/316835#316835
Configuration menu - View commit details
-
Copy full SHA for 87ad458 - Browse repository at this point
Copy the full SHA 87ad458View commit details -
Add actual guranteed order for UNION
We use `union all` because we don't need any of the deduplication logic (`union` is really a union + distinct). `UNION ALL`` does preserve the 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. See https://dba.stackexchange.com/questions/316818/are-results-from-union-all-clauses-always-appended-in-order/316835#316835
Configuration menu - View commit details
-
Copy full SHA for 431b31e - Browse repository at this point
Copy the full SHA 431b31eView commit details -
Configuration menu - View commit details
-
Copy full SHA for d7f40ae - Browse repository at this point
Copy the full SHA d7f40aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for a8056ae - Browse repository at this point
Copy the full SHA a8056aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f317a9 - Browse repository at this point
Copy the full SHA 3f317a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 54bdc0c - Browse repository at this point
Copy the full SHA 54bdc0cView commit details -
Merge branch 'develop' into madlittlemods/fix-and-tests-for-get_last_…
…event_in_room_before_stream_ordering
Configuration menu - View commit details
-
Copy full SHA for 4d585b6 - Browse repository at this point
Copy the full SHA 4d585b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 42f24de - Browse repository at this point
Copy the full SHA 42f24deView commit details -
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
Configuration menu - View commit details
-
Copy full SHA for 03547b0 - Browse repository at this point
Copy the full SHA 03547b0View commit details -
Add
event.internal_metadata.instance_name
and event position to `ge……t_last_event_in_room_before_stream_ordering(...)`
Configuration menu - View commit details
-
Copy full SHA for c94550d - Browse repository at this point
Copy the full SHA c94550dView commit details -
Configuration menu - View commit details
-
Copy full SHA for afb6627 - Browse repository at this point
Copy the full SHA afb6627View commit details -
First pass on
sort_rooms
and refactor to include room membership al……ongside the sync rooms
Configuration menu - View commit details
-
Copy full SHA for af60f7b - Browse repository at this point
Copy the full SHA af60f7bView commit details -
Configuration menu - View commit details
-
Copy full SHA for bd49c34 - Browse repository at this point
Copy the full SHA bd49c34View commit details -
Fix newly_left not being added back if we returned early (when `membe…
…rship_snapshot_token.is_before_or_eq(to_token.room_key)`) Wasn't caught in the tests because the test was wrong
Configuration menu - View commit details
-
Copy full SHA for 5060588 - Browse repository at this point
Copy the full SHA 5060588View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5243a30 - Browse repository at this point
Copy the full SHA 5243a30View commit details -
Configuration menu - View commit details
-
Copy full SHA for d5929f1 - Browse repository at this point
Copy the full SHA d5929f1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8935c6c - Browse repository at this point
Copy the full SHA 8935c6cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 93aa4ff - Browse repository at this point
Copy the full SHA 93aa4ffView commit details
Commits on Jun 13, 2024
-
Merge branch 'develop' into madlittlemods/msc3575-sliding-sync-sort
Conflicts: synapse/storage/databases/main/stream.py tests/storage/test_stream.py
Configuration menu - View commit details
-
Copy full SHA for 185e0b5 - Browse repository at this point
Copy the full SHA 185e0b5View commit details -
Merge branch 'develop' into madlittlemods/msc3575-sliding-sync-sort
Conflicts: synapse/handlers/sliding_sync.py tests/handlers/test_sliding_sync.py
Configuration menu - View commit details
-
Copy full SHA for 8244b25 - Browse repository at this point
Copy the full SHA 8244b25View commit details -
Configuration menu - View commit details
-
Copy full SHA for 35808b3 - Browse repository at this point
Copy the full SHA 35808b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for a917eda - Browse repository at this point
Copy the full SHA a917edaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 84eaeea - Browse repository at this point
Copy the full SHA 84eaeeaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 99ed012 - Browse repository at this point
Copy the full SHA 99ed012View commit details
Commits on Jun 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 7d80418 - Browse repository at this point
Copy the full SHA 7d80418View commit details -
Stable sort with just
stream_ordering
> FWIW `stream_ordering` is unique, so we don't need a tie break. See #17293 (comment)
Configuration menu - View commit details
-
Copy full SHA for ef92f3c - Browse repository at this point
Copy the full SHA ef92f3cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 63ff8f9 - Browse repository at this point
Copy the full SHA 63ff8f9View commit details