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

MSC2326: Add background update to take previous events into account #6310

Merged
merged 21 commits into from Nov 7, 2019

Conversation

babolivier
Copy link
Contributor

Built on top of #6301

Add a background update that goes through all of the events in the server's database and, for each event that has at least one label, saves those labels to the event_labels table, so that events sent prior to upgrading Synapse can be filtered by labels (like the ones sent after the upgrade).

Fixes #6288

@babolivier babolivier requested a review from a team October 31, 2019 14:59
@richvdh richvdh self-assigned this Oct 31, 2019
synapse/storage/data_stores/main/events_bg_updates.py Outdated Show resolved Hide resolved
@babolivier babolivier removed the request for review from a team November 7, 2019 16:20
@babolivier babolivier requested a review from a team November 7, 2019 16:46
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm other than these two nits

synapse/storage/data_stores/main/events_bg_updates.py Outdated Show resolved Hide resolved
synapse/storage/data_stores/main/events_bg_updates.py Outdated Show resolved Hide resolved
babolivier and others added 2 commits November 7, 2019 17:01
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
@babolivier babolivier merged commit 46e5db9 into develop Nov 7, 2019
babolivier pushed a commit that referenced this pull request Sep 1, 2021
* commit '46e5db9eb':
  Update synapse/storage/data_stores/main/events_bg_updates.py
  Update synapse/storage/data_stores/main/events_bg_updates.py
  Copy results
  Revert "Back to using cursor_to_dict"
  Back to using cursor_to_dict
  Initialise value before looping
  Incorporate review
  Fix field name
  Update insert
  Update changelog
  Print out the actual number of affected rows
  Correctly order results
  TODO
  Fix exit condition
  Lint
  Changelog
  Don't try to process events we already have a label for
  Use a sensible default value for labels
  Use the right format for rows
  MSC2326: Add background update to take previous events into account
@babolivier babolivier deleted the babolivier/msc2326_bg_update branch October 28, 2021 15:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants