Skip to content

Commit e963977

Browse files
committed
Add information from #2 to README about being race-safe
Signed-off-by: Olivier Wilkinson (reivilibre) <[email protected]>
1 parent 2c364b1 commit e963977

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ given file that would change the tables to match the calculated state. (Note
1010
that if `-t` is given then each change to a particular state group is wrapped
1111
in a transaction).
1212

13+
The SQL generated by the `-o` option is safe to apply against the database with
14+
Synapse running. This is because the `state_groups` and `state_groups_state`
15+
tables are append-only: once written to the database, they are never modified.
16+
There is therefore no danger of a modification racing against a running synapse.
17+
Further, this script makes its changes within atomic transactions, and each
18+
transaction should not affect the results from any of the queries that synapse
19+
performs.
20+
1321
The tool will also ensure that the generated state deltas do give the same state
1422
as the existing state deltas.
1523

0 commit comments

Comments
 (0)