From 4efe1d4d3f61a0ce3769b119d7169c03ac1f9564 Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Fri, 3 Jan 2020 12:57:24 +0100 Subject: [PATCH 1/5] Fix a typo in the purge jobs configuration example --- synapse/config/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/config/server.py b/synapse/config/server.py index 38f6ff9ed..3463d53d1 100644 --- a/synapse/config/server.py +++ b/synapse/config/server.py @@ -955,7 +955,7 @@ class ServerConfig(Config): #purge_jobs: # - shortest_max_lifetime: 1d # longest_max_lifetime: 3d - # interval: 5m: + # interval: 5m # - shortest_max_lifetime: 3d # longest_max_lifetime: 1y # interval: 24h From dd2954f78dfbea5a24da079e4d9a114f91e55698 Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Fri, 3 Jan 2020 12:58:12 +0100 Subject: [PATCH 2/5] Update sample config --- docs/sample_config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sample_config.yaml b/docs/sample_config.yaml index e3b05423b..cc261d96d 100644 --- a/docs/sample_config.yaml +++ b/docs/sample_config.yaml @@ -394,7 +394,7 @@ retention: #purge_jobs: # - shortest_max_lifetime: 1d # longest_max_lifetime: 3d - # interval: 5m: + # interval: 5m # - shortest_max_lifetime: 3d # longest_max_lifetime: 1y # interval: 24h From 9c59bc59c8daee1c2e98008e9929ac67cf08ff0b Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Fri, 3 Jan 2020 13:00:32 +0100 Subject: [PATCH 3/5] Changelog --- changelog.d/6621.doc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/6621.doc diff --git a/changelog.d/6621.doc b/changelog.d/6621.doc new file mode 100644 index 000000000..6722ccfda --- /dev/null +++ b/changelog.d/6621.doc @@ -0,0 +1 @@ +Fix a typo in the configuration example for purge jobs in the sample configuration file. From 3a864771624313dde75dfd1fa50dfca5cbadc8ca Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Tue, 7 Jan 2020 14:53:07 +0000 Subject: [PATCH 4/5] Change the example from 5min to 12h Have a purge job running every 5min is probably not something we want to advise admins to do as a sort-of default. --- docs/sample_config.yaml | 8 ++++---- synapse/config/server.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/sample_config.yaml b/docs/sample_config.yaml index cc261d96d..77a3fe6cd 100644 --- a/docs/sample_config.yaml +++ b/docs/sample_config.yaml @@ -387,17 +387,17 @@ retention: # # The rationale for this per-job configuration is that some rooms might have a # retention policy with a low 'max_lifetime', where history needs to be purged - # of outdated messages on a very frequent basis (e.g. every 5min), but not want + # of outdated messages on a more frequent basis (e.g. every 12h), but not want # that purge to be performed by a job that's iterating over every room it knows, - # which would be quite heavy on the server. + # which could be heavy on the server. # #purge_jobs: # - shortest_max_lifetime: 1d # longest_max_lifetime: 3d - # interval: 5m + # interval: 12h # - shortest_max_lifetime: 3d # longest_max_lifetime: 1y - # interval: 24h + # interval: 1d ## TLS ## diff --git a/synapse/config/server.py b/synapse/config/server.py index 3463d53d1..11ff55922 100644 --- a/synapse/config/server.py +++ b/synapse/config/server.py @@ -948,17 +948,17 @@ class ServerConfig(Config): # # The rationale for this per-job configuration is that some rooms might have a # retention policy with a low 'max_lifetime', where history needs to be purged - # of outdated messages on a very frequent basis (e.g. every 5min), but not want + # of outdated messages on a more frequent basis (e.g. every 12h), but not want # that purge to be performed by a job that's iterating over every room it knows, - # which would be quite heavy on the server. + # which could be heavy on the server. # #purge_jobs: # - shortest_max_lifetime: 1d # longest_max_lifetime: 3d - # interval: 5m + # interval: 12h # - shortest_max_lifetime: 3d # longest_max_lifetime: 1y - # interval: 24h + # interval: 1d """ % locals() ) From 391fb4779106a291724137e6c52494308729ffcb Mon Sep 17 00:00:00 2001 From: Brendan Abolivier Date: Tue, 7 Jan 2020 14:54:32 +0000 Subject: [PATCH 5/5] Reword --- docs/sample_config.yaml | 6 +++--- synapse/config/server.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/sample_config.yaml b/docs/sample_config.yaml index 77a3fe6cd..cec6b3e54 100644 --- a/docs/sample_config.yaml +++ b/docs/sample_config.yaml @@ -387,9 +387,9 @@ retention: # # The rationale for this per-job configuration is that some rooms might have a # retention policy with a low 'max_lifetime', where history needs to be purged - # of outdated messages on a more frequent basis (e.g. every 12h), but not want - # that purge to be performed by a job that's iterating over every room it knows, - # which could be heavy on the server. + # of outdated messages on a more frequent basis than for the rest of the rooms + # (e.g. every 12h), but not want that purge to be performed by a job that's + # iterating over every room it knows, which could be heavy on the server. # #purge_jobs: # - shortest_max_lifetime: 1d diff --git a/synapse/config/server.py b/synapse/config/server.py index 11ff55922..9ac112233 100644 --- a/synapse/config/server.py +++ b/synapse/config/server.py @@ -948,9 +948,9 @@ class ServerConfig(Config): # # The rationale for this per-job configuration is that some rooms might have a # retention policy with a low 'max_lifetime', where history needs to be purged - # of outdated messages on a more frequent basis (e.g. every 12h), but not want - # that purge to be performed by a job that's iterating over every room it knows, - # which could be heavy on the server. + # of outdated messages on a more frequent basis than for the rest of the rooms + # (e.g. every 12h), but not want that purge to be performed by a job that's + # iterating over every room it knows, which could be heavy on the server. # #purge_jobs: # - shortest_max_lifetime: 1d