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
|
@ -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")
|
logger.info("[purge] removing redundant state groups")
|
||||||
txn.execute_batch(
|
txn.execute_batch(
|
||||||
"DELETE FROM state_groups_state WHERE state_group = ?",
|
"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(
|
txn.execute_batch(
|
||||||
"DELETE FROM state_groups WHERE id = ?",
|
"DELETE FROM state_groups WHERE id = ?",
|
||||||
((sg,) for sg in state_groups_to_delete),
|
[(sg,) for sg in state_groups_to_delete],
|
||||||
)
|
)
|
||||||
|
|
||||||
@trace
|
@trace
|
||||||
|
|
Loading…
Reference in New Issue