diff options
author | Erik Johnston <erik@matrix.org> | 2020-09-28 18:00:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-28 18:00:30 +0100 |
commit | bd380d942fdf91cf1214d6859f2bc97d12a92ab4 (patch) | |
tree | 515186a89d274f7d4272f4cdcb0e9698dac7e2ef /synapse/storage/databases/state | |
parent | Create a mechanism for marking tests "logcontext clean" (#8399) (diff) | |
download | synapse-bd380d942fdf91cf1214d6859f2bc97d12a92ab4.tar.xz |
Add checks for postgres sequence consistency (#8402)
Diffstat (limited to 'synapse/storage/databases/state')
-rw-r--r-- | synapse/storage/databases/state/store.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/databases/state/store.py b/synapse/storage/databases/state/store.py index bec3780a32..989f0cbc9d 100644 --- a/synapse/storage/databases/state/store.py +++ b/synapse/storage/databases/state/store.py @@ -99,6 +99,9 @@ class StateGroupDataStore(StateBackgroundUpdateStore, SQLBaseStore): 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" + ) @cached(max_entries=10000, iterable=True) async def get_state_group_delta(self, state_group): |