Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Make sequence cache_invalidation_stream_seq begins at 2
Browse files Browse the repository at this point in the history
Signed-off-by: Mathieu Velten <mathieuv@matrix.org>
  • Loading branch information
Mathieu Velten committed Sep 9, 2022
1 parent 3d9f82e commit 8327c7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/13766.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make sequence cache_invalidation_stream_seq begins at 2.
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@ CREATE TABLE cache_invalidation_stream_by_instance (

CREATE UNIQUE INDEX cache_invalidation_stream_by_instance_id ON cache_invalidation_stream_by_instance(stream_id);

CREATE SEQUENCE cache_invalidation_stream_seq;
# The sequence needs to begin at 2 because a bunch of code assume that
# get_next_id_txn will return values >= 2, cf this comment:
# https://github.com/matrix-org/synapse/blob/b93bd95e8ab64d27ae26841020f62ee61272a5f2/synapse/storage/util/id_generators.py#L344
CREATE SEQUENCE cache_invalidation_stream_seq MINVALUE 2;

0 comments on commit 8327c7d

Please sign in to comment.