0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-12-15 17:33:44 +01:00
dendrite/keyserver/storage/sqlite3
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 Update all usages of tx.Stmt to sqlutil.TxStmt (#1423) 2020-09-24 11:10:14 +01:00
stale_device_lists.go Use Writer in shared package (#1296) 2020-08-25 10:29:45 +01:00
storage.go Remodel how device list change IDs are created (#2098) 2022-01-21 09:56:06 +00:00