summary refs log tree commit diff
path: root/synapse/_scripts
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2023-07-05 17:25:00 +0100
committerGitHub <noreply@github.com>2023-07-05 17:25:00 +0100
commit39d131b016673bbd4d3c28095c8838b8c6dc0953 (patch)
treee0f4ff47dd5a09ba7c058b8eb90a6d99e30912bd /synapse/_scripts
parentAdd tracing to media `/upload` endpoint (#15850) (diff)
downloadsynapse-39d131b016673bbd4d3c28095c8838b8c6dc0953.tar.xz
Add basic read/write lock (#15782)
Diffstat (limited to 'synapse/_scripts')
-rwxr-xr-xsynapse/_scripts/synapse_port_db.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/synapse/_scripts/synapse_port_db.py b/synapse/_scripts/synapse_port_db.py
index e126a2e0c5..7c4aa0afa2 100755
--- a/synapse/_scripts/synapse_port_db.py
+++ b/synapse/_scripts/synapse_port_db.py
@@ -197,6 +197,11 @@ IGNORED_TABLES = {
     "ui_auth_sessions",
     "ui_auth_sessions_credentials",
     "ui_auth_sessions_ips",
+    # Ignore the worker locks table, as a) there shouldn't be any acquired locks
+    # after porting, and b) the circular foreign key constraints make it hard to
+    # port.
+    "worker_read_write_locks_mode",
+    "worker_read_write_locks",
 }
 
 
@@ -805,7 +810,9 @@ class Porter:
             )
             # Map from table name to args passed to `handle_table`, i.e. a tuple
             # of: `postgres_size`, `table_size`, `forward_chunk`, `backward_chunk`.
-            tables_to_port_info_map = {r[0]: r[1:] for r in setup_res}
+            tables_to_port_info_map = {
+                r[0]: r[1:] for r in setup_res if r[0] not in IGNORED_TABLES
+            }
 
             # Step 5. Do the copying.
             #