HomePhabricator
Diffusion Comm a00f7ca2cc31

[keyserver] Improve SQL performance in deleteThread

Description

[keyserver] Improve SQL performance in deleteThread

Summary:
Noticed that deleteThread performance was horrendous... the query took like 15min, and it took locks on a bunch of tables while it was ongoing.

We had a similar problem for deleteAccount that was solved in D1288 by splitting up the query, so I decided to do the same thing here.

Test Plan:

  1. Performance: I tested the query on my production keyserver and found that it took less than 0.1s.
  2. Correctness: I created a channel in my local dev environment, and then deleted it from the UI. I looked into the database and confirmed that the relevant rows were deleted.

Reviewers: tomek, atul

Reviewed By: atul

Differential Revision: https://phab.comm.dev/D8837

Details

Provenance
ashoatAuthored on Aug 16 2023, 10:52 AM
Reviewer
atul
Differential Revision
D8837: [keyserver] Improve SQL performance in deleteThread
Parents
rCOMMdb9e97344849: [web] Introduce barebones `EditThreadAvatar` component
Branches
Unknown
Tags
Unknown