HomePhabricator
Diffusion Comm dd58826093a1

[server] Use single connection with DB for migrations

Description

[server] Use single connection with DB for migrations

Summary:
Database migrations are performed wrapped in transactions that require single connection with database.
This diff fixes problem with deadlocks, that appeared when trying to update permissions for all threads, which was caused by using connection pool.
After the change, until all migrations are performed, only one connection to database is established.

Test Plan: Run multiple times migration from D4071, that caused problems with locks. The issue no longer appears.

Reviewers: palys-swm, atul, yayabosh, ashoat

Reviewed By: ashoat

Subscribers: ashoat, Adrian, yayabosh

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

Details

Provenance
jacekAuthored on Jul 15 2022, 1:54 AM
Reviewer
ashoat
Differential Revision
D4514: [server] Use single connection with DB for migrations
Parents
rCOMM58b491f3f390: [server] [fix] Unify permissions for `OPEN_SUBTHREAD` and `SECRET_SUBTHREAD`
Branches
Unknown
Tags
Unknown