This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5706 from matrix-org/erikj/add_memberships_to_cur…
…rent_state Add membership column to current_state_events table
- v1.98.0
- v1.98.0rc1
- v1.97.0
- v1.97.0rc1
- v1.96.1
- v1.96.0
- v1.96.0rc1
- v1.95.1
- v1.95.0
- v1.95.0rc1
- v1.94.0
- v1.94.0rc1
- v1.93.0
- v1.93.0rc1
- v1.92.3
- v1.92.2
- v1.92.1
- v1.92.0
- v1.92.0rc1
- v1.91.2
- v1.91.1
- v1.91.0
- v1.91.0rc1
- v1.90.0
- v1.90.0rc1
- v1.89.0
- v1.89.0rc1
- v1.88.0
- v1.88.0rc1
- v1.87.0
- v1.87.0rc1
- v1.86.0
- v1.86.0rc2
- v1.86.0rc1
- v1.85.2
- v1.85.1
- v1.85.0
- v1.85.0rc2
- v1.85.0rc1
- v1.84.1
- v1.84.0
- v1.84.0rc1
- v1.83.0
- v1.83.0rc1
- v1.82.0
- v1.82.0rc1
- v1.81.0
- v1.81.0rc2
- v1.81.0rc1
- v1.80.0
- v1.80.0rc2
- v1.80.0rc1
- v1.79.0
- v1.79.0rc2
- v1.79.0rc1
- v1.78.0
- v1.78.0rc1
- v1.77.0
- v1.77.0rc2
- v1.77.0rc1
- v1.76.0
- v1.76.0rc2
- v1.76.0rc1
- v1.75.0
- v1.75.0rc2
- v1.75.0rc1
- v1.74.0
- v1.74.0rc1
- v1.73.0
- v1.73.0rc2
- v1.73.0rc1
- v1.72.0
- v1.72.0rc1
- v1.71.0
- v1.71.0rc2
- v1.71.0rc1
- v1.70.1
- v1.70.0
- v1.70.0rc2
- v1.70.0rc1
- v1.69.0
- v1.69.0rc4
- v1.69.0rc3
- v1.69.0rc2
- v1.69.0rc1
- v1.68.0
- v1.68.0rc2
- v1.68.0rc1
- v1.67.0
- v1.67.0rc1
- v1.66.0
- v1.66.0rc2
- v1.66.0rc1
- v1.65.0
- v1.65.0rc2
- v1.65.0rc1
- v1.65.0.post1.dev1
- v1.64.0
- v1.64.0rc2
- v1.64.0rc1
- v1.63.1
- v1.63.0
- v1.63.0rc1
- v1.62.0
- v1.62.0rc3
- v1.62.0rc2
- v1.62.0rc1
- v1.61.1
- v1.61.0
- v1.61.0rc1
- v1.60.0
- v1.60.0rc2
- v1.60.0rc1
- v1.59.1
- v1.59.0
- v1.59.0rc2
- v1.59.0rc1
- v1.58.1
- v1.58.0
- v1.58.0rc2
- v1.58.0rc1
- v1.57.1
- v1.57.0
- v1.57.0rc1
- v1.56.0
- v1.56.0rc1
- v1.55.2
- v1.55.1
- v1.55.0
- v1.55.0rc1
- v1.54.0
- v1.54.0rc1
- v1.53.0
- v1.53.0rc1
- v1.52.0
- v1.52.0rc1
- v1.51.0
- v1.51.0rc2
- v1.51.0rc1
- v1.50.2
- v1.50.1
- v1.50.0
- v1.50.0rc2
- v1.50.0rc1
- v1.49.2
- v1.49.1
- v1.49.0
- v1.49.0rc1
- v1.48.0
- v1.48.0rc1
- v1.47.1
- v1.47.0
- v1.47.0rc3
- v1.47.0rc2
- v1.47.0rc1
- v1.46.0
- v1.46.0rc1
- v1.46-modular1
- v1.45.1
- v1.45.0
- v1.45.0rc2
- v1.45.0rc1
- v1.44.0
- v1.44.0rc3
- v1.44.0rc2
- v1.44.0rc1
- v1.43.0
- v1.43.0rc2
- v1.43.0rc1
- v1.42.0
- v1.42.0rc2
- v1.42.0rc1
- v1.41.1
- v1.41.0
- v1.41.0rc1
- v1.40.0
- v1.40.0rc3
- v1.40.0rc2
- v1.40.0rc1
- v1.39.0
- v1.39.0rc3
- v1.39.0rc2
- v1.39.0rc1
- v1.38.1
- v1.38.0
- v1.38.0rc3
- v1.38.0rc2
- v1.38.0rc1
- v1.37.1
- v1.37.1rc1
- v1.37.1a1
- v1.37.0
- v1.37.0rc1
- v1.36.0
- v1.36.0rc2
- v1.36.0rc1
- v1.35.1
- v1.35.0
- v1.35.0rc3
- v1.35.0rc2
- v1.35.0rc1
- v1.34.0
- v1.34.0rc1
- v1.33.2
- v1.33.1
- v1.33.0
- v1.33.0rc2
- v1.33.0rc1
- v1.32.2
- v1.32.1
- v1.32.0
- v1.32.0rc1
- v1.31.0
- v1.31.0rc1
- v1.30.1
- v1.30.0
- v1.30.0rc1
- v1.29.0
- v1.29.0rc1
- v1.28.0
- v1.28.0rc1
- v1.27.0
- v1.27.0rc2
- v1.27.0rc1
- v1.26.0
- v1.26.0rc2
- v1.26.0rc1
- v1.26.0-deb
- v1.25.0
- v1.25.0rc1
- v1.24.0
- v1.24.0rc2
- v1.24.0rc1
- v1.23.1
- v1.23.0
- v1.23.0rc1
- v1.22.1
- v1.22.0
- v1.22.0rc2
- v1.22.0rc1
- v1.21.2
- v1.21.1
- v1.21.0
- v1.21.0rc3
- v1.21.0rc2
- v1.21.0rc1
- v1.20.1
- v1.20.0
- v1.20.0rc5
- v1.20.0rc4
- v1.20.0rc3
- v1.20.0rc2
- v1.20.0rc1
- v1.19.3
- v1.19.2
- v1.19.1
- v1.19.1rc1
- v1.19.0
- v1.19.0rc1
- v1.18.0
- v1.18.0rc2
- v1.18.0rc1
- v1.17.0
- v1.17.0rc1
- v1.17.0-mod1-modular-vdhtest2
- v1.16.1
- v1.16.0
- v1.16.0rc2
- v1.16.0rc1
- v1.15.2
- v1.15.1
- v1.15.0
- v1.15.0rc1
- v1.14.0
- v1.14.0rc2
- v1.14.0rc1
- v1.13.0
- v1.13.0rc3
- v1.13.0rc2
- v1.13.0rc1
- v1.12.4
- v1.12.4rc1
- v1.12.3
- v1.12.2
- v1.12.1
- v1.12.1rc1
- v1.12.0
- v1.12.0rc1
- v1.11.1
- v1.11.0
- v1.11.0rc1
- v1.10.1
- v1.10.0
- v1.10.0rc5
- v1.10.0rc4
- v1.10.0rc3
- v1.10.0rc2
- v1.10.0rc1
- v1.9.1
- v1.9.0
- v1.9.0rc1
- v1.9.0.dev2
- v1.9.0.dev1
- v1.8.0
- v1.8.0rc1
- v1.7.3
- v1.7.2
- v1.7.1
- v1.7.1_modular_profile_hotfix
- v1.7.0
- v1.7.0rc2
- v1.7.0rc1
- v1.6.1
- v1.6.0
- v1.6.0rc2
- v1.6.0rc1
- v1.5.1
- v1.5.1_modular_device_hotfix
- v1.5.0
- v1.5.0rc2
- v1.5.0rc1
- v1.4.1
- v1.4.1rc1
- v1.4.0
- v1.4.0rc2
- v1.4.0rc1
- v1.3.1
- v1.3.0
- v1.3.0rc1
- v0.1
- modular-dev-v1.3.2-alpha.5+modular
- modular-dev-v1.3.2-alpha.4+modular
- modular-dev-v1.3.2-alpha.3+modular
- modular-dev-v1.3.2-alpha.2+modular
- modular-dev-v1.3.2-alpha.1+modular
- 1.7.2
Showing
8 changed files
with
195 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Reduce database IO usage by optimising queries for current membership. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
synapse/storage/schema/delta/56/current_state_events_membership.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* Copyright 2019 The Matrix.org Foundation C.I.C. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
-- We add membership to current state so that we don't need to join against | ||
-- room_memberships, which can be surprisingly costly (we do such queries | ||
-- very frequently). | ||
-- This will be null for non-membership events and the content.membership key | ||
-- for membership events. (Will also be null for membership events until the | ||
-- background update job has finished). | ||
ALTER TABLE current_state_events ADD membership TEXT; | ||
|
||
INSERT INTO background_updates (update_name, progress_json) VALUES | ||
('current_state_events_membership', '{}'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters