From 68955b7ff7485df3bd80ec5c3e06e50d34e0978c Mon Sep 17 00:00:00 2001 From: erikjohnston Date: Mon, 8 Nov 2021 16:08:28 +0000 Subject: deploy: 4ee71b96377c39a2b9d060c6aafbce62fb16ccc6 --- develop/print.html | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) (limited to 'develop/print.html') diff --git a/develop/print.html b/develop/print.html index bd38ad55b2..df69fe110a 100644 --- a/develop/print.html +++ b/develop/print.html @@ -101,7 +101,7 @@ @@ -9073,6 +9073,57 @@ milliseconds since epoch:

"expiration_ts": 0 } +

Background Updates API

+

This API allows a server administrator to manage the background updates being +run against the database.

+

Status

+

This API gets the current status of the background updates.

+

The API is:

+
GET /_synapse/admin/v1/background_updates/status
+
+

Returning:

+
{
+    "enabled": true,
+    "current_updates": {
+        "<db_name>": {
+            "name": "<background_update_name>",
+            "total_item_count": 50,
+            "total_duration_ms": 10000.0,
+            "average_items_per_ms": 2.2,
+        },
+    }
+}
+
+

enabled whether the background updates are enabled or disabled.

+

db_name the database name (usually Synapse is configured with a single database named 'master').

+

For each update:

+

name the name of the update. +total_item_count total number of "items" processed (the meaning of 'items' depends on the update in question). +total_duration_ms how long the background process has been running, not including time spent sleeping. +average_items_per_ms how many items are processed per millisecond based on an exponential average.

+

Enabled

+

This API allow pausing background updates.

+

Background updates should not be paused for significant periods of time, as +this can affect the performance of Synapse.

+

Note: This won't persist over restarts.

+

Note: This won't cancel any update query that is currently running. This is +usually fine since most queries are short lived, except for CREATE INDEX +background updates which won't be cancelled once started.

+

The API is:

+
POST /_synapse/admin/v1/background_updates/enabled
+
+

with the following body:

+
{
+    "enabled": false
+}
+
+

enabled sets whether the background updates are enabled or disabled.

+

The API returns the enabled param.

+
{
+    "enabled": false
+}
+
+

There is also a GET version which returns the enabled state.

Delete a local group

This API lets a server admin delete a local group. Doing so will kick all users out of the group so that their clients will correctly handle the group -- cgit 1.5.1