-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Update user_filters
table to have a unique index, and non-null columns
#1172
Conversation
Can one of the admins verify this patch? |
4 similar comments
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
Can one of the admins verify this patch? |
f990e08
to
c293aeb
Compare
@pik The way the schema upgrade stuff works is that we create a new "version" after every release, so creating a new 37 is the correct thing to do here since 36 is the latest in the release. You will need to bump the @matrixbot ok to test |
@matrixbot retest this please |
Hmm, this might require some more thought given its going to break starting synapse if it has duplicate filter ids. |
Yeah probably needs to come with a pre-migration 'clean-up-task'. I will update. |
Ah, apologies, it seems what I am asking about already exists (still navigating my way around the code-base). Updated. |
4b8079b
to
877f82b
Compare
877f82b
to
1805e49
Compare
* especially relevant since the current increment code is not atomic
1805e49
to
c1cfd6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea why this has been ignored for 3 years.
user_filters
table to have a unique index, and non-null columns
Swaps the
user_filter
Table index to Unique, the current code does not use a single transaction or optimistic locking.https://github.com/matrix-org/synapse/blob/master/synapse/storage/filtering.py#L43
Not sure on the procedure for PRing schema changes, so let me know if I'm missing something.