summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-05-30 15:28:37 +0100
committerGitHub <noreply@github.com>2019-05-30 15:28:37 +0100
commit57b3751918015c5d3a38dd6c40645969ee05ee22 (patch)
treec3e8f8b6b04b25437ce6bab7811e79d3a6f211a5
parentMerge pull request #5278 from matrix-org/erikj/cleanup_bad_extremities (diff)
parentNewsfile (diff)
downloadsynapse-57b3751918015c5d3a38dd6c40645969ee05ee22.tar.xz
Merge pull request #5291 from matrix-org/erikj/add_index
Add index to temp bg update extremity table
-rw-r--r--changelog.d/5291.bugfix1
-rw-r--r--synapse/storage/schema/delta/54/delete_forward_extremities.sql1
2 files changed, 2 insertions, 0 deletions
diff --git a/changelog.d/5291.bugfix b/changelog.d/5291.bugfix
new file mode 100644
index 0000000000..9e14d20289
--- /dev/null
+++ b/changelog.d/5291.bugfix
@@ -0,0 +1 @@
+Fix bug where we leaked extremities when we soft failed events, leading to performance degradation.
diff --git a/synapse/storage/schema/delta/54/delete_forward_extremities.sql b/synapse/storage/schema/delta/54/delete_forward_extremities.sql
index aa40f13da7..b062ec840c 100644
--- a/synapse/storage/schema/delta/54/delete_forward_extremities.sql
+++ b/synapse/storage/schema/delta/54/delete_forward_extremities.sql
@@ -20,3 +20,4 @@ INSERT INTO background_updates (update_name, progress_json) VALUES
 
 DROP TABLE IF EXISTS _extremities_to_check;  -- To make this delta schema file idempotent.
 CREATE TABLE _extremities_to_check AS SELECT event_id FROM event_forward_extremities;
+CREATE INDEX _extremities_to_check_id ON _extremities_to_check(event_id);