0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-12-15 10:33:43 +01:00
dendrite/keyserver/storage/postgres
kegsay 2c581377a5
Remodel how device list change IDs are created (#2098)
* Remodel how device list change IDs are created

Previously we made them using the offset Kafka supplied.
We don't run Kafka anymore, so now we make the SQL table assign
the change ID via an AUTOINCREMENTing ID. Redesign the
`keyserver_key_changes` table to have `UNIQUE(user_id)` so we
don't accumulate key changes forevermore, we now have at most 1
row per user which contains the highest change ID.

This needs a SQL migration.

* Ensure we bump the change ID on sqlite

* Actually read the DeviceChangeID not the Offset in synapi

* Add SQL migrations

* Prepare after migration; fixup dendrite-upgrade-test logging

* Use higher version numbers; fix sqlite query to increment better

* Default 0 on postgres

* fixup postgres migration on fresh dendrite instances
2022-01-21 09:56:06 +00:00
..
deltas Remodel how device list change IDs are created (#2098) 2022-01-21 09:56:06 +00:00
cross_signing_keys_table.go Cross-signing storage code (#1959) 2021-08-04 17:31:18 +01:00
cross_signing_sigs_table.go Delete device keys/signatures from key server when deleting devices (#1979) 2021-08-18 12:07:09 +01:00
device_keys_table.go Delete device keys/signatures from key server when deleting devices (#1979) 2021-08-18 12:07:09 +01:00
key_changes_table.go Remodel how device list change IDs are created (#2098) 2022-01-21 09:56:06 +00:00
one_time_keys_table.go Try to optimize SelectOneTimeKeys (#1851) 2021-06-07 09:17:46 +01:00
stale_device_lists.go Finish inbound E2E device lists (#1243) 2020-08-07 17:32:13 +01:00
storage.go Remodel how device list change IDs are created (#2098) 2022-01-21 09:56:06 +00:00