This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Reintroduce DB changes from #14979, using SCHEMA_COMPAT_VERSION mechanism #15014
Closed
Description
The changes in #14979
ALTER TABLE current_state_events ADD COLUMN event_stream_ordering BIGINT;
ALTER TABLE local_current_membership ADD COLUMN event_stream_ordering BIGINT;
ALTER TABLE room_memberships ADD COLUMN event_stream_ordering BIGINT;
INSERT INTO background_updates (update_name, progress_json) VALUES
('populate_membership_event_stream_ordering', '{}');
Problems:
- the query used by
get_ex_outlier_stream_rows_txn
becomes ambiguous: there are two columns called event_stream_ordering. Addevent_stream_ordering
column to membership state tables #14979 disambiguates this, but won't exist in old code. - the background update doesn't add an ordering, so it might usurp other updates in the queue.
Questions:
- does the new query assume the
populate_membership_event_stream_ordering
background update has completed? How long do we expect it will take?
For 1.77 I
- reverted the PR: 9cd7610
- but kept in the change which disambiguates the columns in the source code anyway: f10caa7
- and bump SCHEMA_VERSION: Bump schema version #15036
For the future we should try to land the schema changes gradually (see guidance) over the next few releases.
Metadata
Assignees
Labels
DB stuff like queries, migrations, new/remove columns, indexes, unexpected entries in the dbPerformance, both client-facing and admin-facingAffects or can be seen by some users regularly or most users rarelyMinor significance, cosmetic issues, low or no impact to users.New features, changes in functionality, improvements in performance, or user-facing enhancements.