Merge pull request #12 from reivilibre/master

Add information from #2 to README about being race-safe
This commit is contained in:
Erik Johnston
2020-02-20 13:03:59 +00:00
committed by GitHub

View File

@@ -10,6 +10,14 @@ given file that would change the tables to match the calculated state. (Note
that if `-t` is given then each change to a particular state group is wrapped
in a transaction).
The SQL generated by the `-o` option is safe to apply against the database with
Synapse running. This is because the `state_groups` and `state_groups_state`
tables are append-only: once written to the database, they are never modified.
There is therefore no danger of a modification racing against a running synapse.
Further, this script makes its changes within atomic transactions, and each
transaction should not affect the results from any of the queries that synapse
performs.
The tool will also ensure that the generated state deltas do give the same state
as the existing state deltas.