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

Fix order of partial state tables when purging #15068

Merged
merged 5 commits into from
Feb 14, 2023
Merged

Fix order of partial state tables when purging #15068

merged 5 commits into from
Feb 14, 2023

Commits on Feb 13, 2023

  1. Fix order of partial state tables when purging

    `partial_state_rooms` has an FK on `events` pointing to the join event we
    get from `/send_join`, so we must delete from that table before deleting
    from `events`.
    
    **NB:** It would be nice to cancel any resync processes for the room
    being purged. We do not do this at present. To do so reliably we'd need
    an internal HTTP "replication" endpoint, because the worker doing the
    resync process may be different to that handling the purge request.
    
    The first time the resync process tries to write data after the deletion
    it will fail because we have deleted necessary data e.g. auth
    events. AFAICS it will not retry the resync, so the only downside to
    not cancelling the resync is a scary-looking traceback.
    
    (This is presumably extremely race-sensitive.)
    David Robertson committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    43ae8a9 View commit details
    Browse the repository at this point in the history
  2. Changelog

    David Robertson committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    3821005 View commit details
    Browse the repository at this point in the history
  3. admist(?) -> between

    David Robertson authored Feb 13, 2023
    Configuration menu
    Copy the full SHA
    a0b0ffa View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2023

  1. Warn about a race

    David Robertson committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    680c0d3 View commit details
    Browse the repository at this point in the history
  2. Fix typo, thanks Sean

    Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com>
    David Robertson and squahtx authored Feb 14, 2023
    Configuration menu
    Copy the full SHA
    568ad5e View commit details
    Browse the repository at this point in the history