mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-24 02:25:45 +03:00
Remove Generator
in _purge_unreferenced_state_groups
twice (#17815)
Context: https://github.com/matrix-org/synapse/issues/15439 (https://github.com/element-hq/synapse/issues/15439) Also see discussion in https://github.com/element-hq/synapse/pull/17813
This commit is contained in:
parent
0c429fae1d
commit
034d472688
2 changed files with 3 additions and 2 deletions
1
changelog.d/17815.bugfix
Normal file
1
changelog.d/17815.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Avoid lost data on some database query retries.
|
|
@ -804,11 +804,11 @@ class StateGroupDataStore(StateBackgroundUpdateStore, SQLBaseStore):
|
|||
logger.info("[purge] removing redundant state groups")
|
||||
txn.execute_batch(
|
||||
"DELETE FROM state_groups_state WHERE state_group = ?",
|
||||
((sg,) for sg in state_groups_to_delete),
|
||||
[(sg,) for sg in state_groups_to_delete],
|
||||
)
|
||||
txn.execute_batch(
|
||||
"DELETE FROM state_groups WHERE id = ?",
|
||||
((sg,) for sg in state_groups_to_delete),
|
||||
[(sg,) for sg in state_groups_to_delete],
|
||||
)
|
||||
|
||||
@trace
|
||||
|
|
Loading…
Reference in a new issue