This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Set thread_id column to non-null for event_push_{actions,actions_staging,summary} #15437
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ing,summary} (#15350) Clean-up from adding the thread_id column, which was initially null but backfilled with values. It is desirable to require it to now be non-null. In addition to altering this column to be non-null, we clean up obsolete background jobs, indexes, and just-in-time updating code.
I'm not really sure how to test that this won't lock the table / cause matrix.org issues, but the documentation sounds like it should work? |
Shout-out to @reivilibre for figuring out this approach, by the way! |
synapse/storage/schema/main/delta/74/03thread_notifications_not_null.sql.postgres
Outdated
Show resolved
Hide resolved
@erikjohnston I think this is all set now, pending CI being happy. |
erikjohnston
approved these changes
May 3, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updates the schema to require a
thread_id
(i.e. add a constraint that the column is non-null) forevent_push_actions
,event_push_actions_staging
, andevent_push_actions_summary
.This bumps the schema compat version to 74. This was last bumped in #15036, which was released in v1.77.0rc2 so users will be unable to rollback to earlier than that version.
This has a few commits, it performs the following operations:
IS NULL
indices *after* theALTER TABLE
statement. #15357.NOT VALID
constraint.Fixes #14225
Fixes #15359