mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 18:14:48 -04:00
Add checks for postgres sequence consistency (#8402)
This commit is contained in:
parent
5e3ca12b15
commit
bd380d942f
8 changed files with 160 additions and 6 deletions
|
@ -258,6 +258,11 @@ class MultiWriterIdGenerator:
|
|||
|
||||
self._sequence_gen = PostgresSequenceGenerator(sequence_name)
|
||||
|
||||
# We check that the table and sequence haven't diverged.
|
||||
self._sequence_gen.check_consistency(
|
||||
db_conn, table=table, id_column=id_column, positive=positive
|
||||
)
|
||||
|
||||
# This goes and fills out the above state from the database.
|
||||
self._load_current_ids(db_conn, table, instance_column, id_column)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue