mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 00:24:54 -04:00
Refactor to ensure we call check_consistency (#9470)
The idea here is to stop people forgetting to call `check_consistency`. Folks can still just pass in `None` to the new args in `build_sequence_generator`, but hopefully they won't.
This commit is contained in:
parent
713145d3de
commit
0b5c967813
8 changed files with 72 additions and 28 deletions
|
@ -97,10 +97,12 @@ class StateGroupDataStore(StateBackgroundUpdateStore, SQLBaseStore):
|
|||
return txn.fetchone()[0]
|
||||
|
||||
self._state_group_seq_gen = build_sequence_generator(
|
||||
self.database_engine, get_max_state_group_txn, "state_group_id_seq"
|
||||
)
|
||||
self._state_group_seq_gen.check_consistency(
|
||||
db_conn, table="state_groups", id_column="id"
|
||||
db_conn,
|
||||
self.database_engine,
|
||||
get_max_state_group_txn,
|
||||
"state_group_id_seq",
|
||||
table="state_groups",
|
||||
id_column="id",
|
||||
)
|
||||
|
||||
@cached(max_entries=10000, iterable=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue