HomePhabricator
Diffusion Comm 1f65502417b0

[keyserver] Run migration to update thread pinned_counts

Description

[keyserver] Run migration to update thread pinned_counts

Summary:
Based on the changes made in D8683, we should also run a
safeguard migration to update the threads.pinned_count values to match
the number of messages in the database that are pinned for each thread.

Depends on D8683

Test Plan:

  1. Pinned some messages
  2. Set the threads.pinned_count = 0 to emulate a corrupt state that could occur because of this bug (invalid pinned_count value)
  3. Run the query
  4. Ensure that the pinned count values updated

Reviewers: atul, ginsu, tomek, ashoat

Reviewed By: ashoat

Subscribers: ashoat

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

Details

Provenance
rohanAuthored on Aug 4 2023, 9:00 AM
Reviewer
ashoat
Differential Revision
D8732: [keyserver] Run migration to update thread pinned_counts
Parents
rCOMM65e4193c4b28: [keyserver] Fix the pinned count MariaDB out of range issue
Branches
Unknown
Tags
Unknown