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

Remove redundant event_edges.room_id and event_edges.is_state columns #12892

Open

Description

@richvdh

room_id is implied by the event_id. (see also #3613)
is_state is unused since #4837.

Both are clutter and need to go away.

Activity

  1. added
    T-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
    on May 27, 2022
  2. added
    A-DatabaseDB stuff like queries, migrations, new/remove columns, indexes, unexpected entries in the db
    on Sep 22, 2022
  3. MadLittleMods commented on Sep 22, 2022

    @MadLittleMods
    Contributor

    delete them altogether

    At what point can we delete event_edges.is_state from our SQL queries? It seems like we have to support it forever given it's a background update to drop the rows.

    I'm coming from this discussion for context: #13635 (comment)

  4. richvdh commented on Sep 23, 2022

    @richvdh
    MemberAuthor

    At what point can we delete event_edges.is_state from our SQL queries? It seems like we have to support it forever given it's a background update to drop the rows.

    I haven't entirely figured this out yet. I think what we need to do is add a new synchronous db migration which checks if the bg update has completed, and if not, does the update synchronously. Once that has happened, it is safe to remove the conditions from the queries, and finally to drop the columns altogether.

    But we shouldn't do that until it is likely that most people have completed the bg update.

  5. richvdh commented on Sep 23, 2022

    @richvdh
    MemberAuthor

    But we shouldn't do that until it is likely that most people have completed the bg update.

    (That may well be true already. I haven't thought about this for a few months.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-DatabaseDB stuff like queries, migrations, new/remove columns, indexes, unexpected entries in the dbT-TaskRefactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions