From dff25b3330b2ee8d3203043ec96d58e71fe98f81 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
Date: Thu, 16 Feb 2023 00:41:10 +0100
Subject: [PATCH] matrix: Disable retention

Deleting events causes database corruption, see e.g.
https://github.com/matrix-org/synapse/issues/11738 and
https://github.com/matrix-org/synapse/issues/13476.
---
 roles/matrix/templates/homeserver.yaml.j2 | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/roles/matrix/templates/homeserver.yaml.j2 b/roles/matrix/templates/homeserver.yaml.j2
index b2473d204..887f03833 100644
--- a/roles/matrix/templates/homeserver.yaml.j2
+++ b/roles/matrix/templates/homeserver.yaml.j2
@@ -60,21 +60,8 @@ caches:
 
 # Retention
 delete_stale_devices_after: 1y
-retention:
-  enabled: true
-  default_policy:
-    min_lifetime: 1d
-    max_lifetime: 1y
-  allowed_lifetime_min: 1d
-  allowed_lifetime_max: 1y
-  purge_jobs:
-    - longest_max_lifetime: 3d
-      interval: 12h
-    - shortest_max_lifetime: 3d
-      interval: 1d
 media_retention:
-  local_media_lifetime: 1y
-  remote_media_lifetime: 28d
+  remote_media_lifetime: 14d
 
 # Media repository
 media_store_path: "/var/lib/synapse/media_store"
-- 
GitLab