synapse/tests/storage
Eric Eastwood 3fef535ff2
Add rooms.bump_stamp to Sliding Sync /sync for easier client-side sorting (#17395)
`bump_stamp` corresponds to the `stream_ordering` of the latest `DEFAULT_BUMP_EVENT_TYPES` in the room. This helps clients sort more readily without them needing to pull in a bunch of the timeline to determine the last activity. `bump_event_types` is a thing because for example, we don't want display name changes to mark the room as unread and bump it to the top. For encrypted rooms, we just have to consider any activity as a bump because we can't see the content and the client has to figure it out for themselves.

Outside of Synapse, `bump_stamp` is just a free-form counter so other implementations could use `received_ts`or `origin_server_ts` (see the [*Security considerations* section in MSC3575 about the potential pitfalls of using `origin_server_ts`](https://github.com/matrix-org/matrix-spec-proposals/blob/kegan/sync-v3/proposals/3575-sync.md#security-considerations)). It doesn't have any guarantee about always going up. In the Synapse case, it could go down if an event was redacted/removed (or purged in cases of retention policies).

In the future, we could add `bump_event_types` as [MSC3575](https://github.com/matrix-org/matrix-spec-proposals/pull/3575) mentions if people need to customize the event types.

---

In the Sliding Sync proxy, a similar [`timestamp` field was added](https://github.com/matrix-org/sliding-sync/pull/247) for the same purpose but the name is not obvious what it pertains to or what it's for.

The `timestamp` field was also added to Ruma in https://github.com/ruma/ruma/pull/1622
2024-07-08 13:17:08 -05:00
..
databases Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
util Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
__init__.py Reference Matrix Home Server 2014-08-12 15:10:52 +01:00
test__base.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_account_data.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_appservice.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_background_update.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_base.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_cleanup_extrems.py Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
test_client_ips.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_database.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_devices.py Reintroduce "Reduce device lists replication traffic."" (#17361) 2024-06-25 10:34:34 +01:00
test_directory.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_e2e_room_keys.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_end_to_end_keys.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_event_chain.py Reintroduce #17291. (#17338) 2024-06-24 14:40:28 +00:00
test_event_federation.py Reintroduce #17291. (#17338) 2024-06-24 14:40:28 +00:00
test_event_metrics.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_event_push_actions.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_events.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_id_generators.py Set our own stream position from the current sequence value on startup (#17309) 2024-06-17 11:50:00 +00:00
test_main.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_monthly_active_users.py Update license headers 2023-11-21 15:29:58 -05:00
test_profile.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_purge.py Update license headers 2023-11-21 15:29:58 -05:00
test_receipts.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_redaction.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_registration.py Add support for MSC3823 - Account Suspension (#17051) 2024-05-01 17:45:17 +01:00
test_relations.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_rollback_worker.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_room.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_room_search.py Return the search terms as search highlights for SQLite instead of nothing (#17000) 2024-04-26 09:43:52 +01:00
test_roommember.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_state.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_stream.py Add rooms.bump_stamp to Sliding Sync /sync for easier client-side sorting (#17395) 2024-07-08 13:17:08 -05:00
test_transactions.py Update license headers 2023-11-21 15:29:58 -05:00
test_txn_limit.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_unsafe_locale.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_user_directory.py Handle hyphens in user dir search porperly (#17254) 2024-06-05 10:40:34 +01:00
test_user_filters.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00