mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-07 23:15:00 -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
|
@ -41,6 +41,9 @@ class RegistrationWorkerStore(SQLBaseStore):
|
|||
self.config = hs.config
|
||||
self.clock = hs.get_clock()
|
||||
|
||||
# Note: we don't check this sequence for consistency as we'd have to
|
||||
# call `find_max_generated_user_id_localpart` each time, which is
|
||||
# expensive if there are many entries.
|
||||
self._user_id_seq = build_sequence_generator(
|
||||
database.engine, find_max_generated_user_id_localpart, "user_id_seq",
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue