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 commit '5d92a1428' into anoa/dinsic_release_1_21_x
* commit '5d92a1428': Prevent join->join membership transitions changing member count (#7977)
- Loading branch information
Showing
6 changed files
with
126 additions
and
13 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 @@ | ||
Fix a bug introduced in Synapse v1.7.2 which caused inaccurate membership counts in the room directory. |
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
32 changes: 32 additions & 0 deletions
32
synapse/storage/data_stores/main/schema/delta/58/12room_stats.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,32 @@ | ||
/* Copyright 2020 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. | ||
*/ | ||
|
||
-- Recalculate the stats for all rooms after the fix to joined_members erroneously | ||
-- incrementing on per-room profile changes. | ||
|
||
-- Note that the populate_stats_process_rooms background update is already set to | ||
-- run if you're upgrading from Synapse <1.0.0. | ||
|
||
-- Additionally, if you've upgraded to v1.18.0 (which doesn't include this fix), | ||
-- this bg job runs, and then update to v1.19.0, you'd end up with only half of | ||
-- your rooms having room stats recalculated after this fix was in place. | ||
|
||
-- So we've switched the old `populate_stats_process_rooms` background job to a | ||
-- no-op, and then kick off a bg job with a new name, but with the same | ||
-- functionality as the old one. This effectively restarts the background job | ||
-- from the beginning, without running it twice in a row, supporting both | ||
-- upgrade usecases. | ||
INSERT INTO background_updates (update_name, progress_json) VALUES | ||
('populate_stats_process_rooms_2', '{}'); |
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