1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 23:02:42 +01:00
phorge-phorge/resources/sql/autopatches/20180305.lock.01.locklog.sql
epriestley 44f0664d2c Add a "lock log" for debugging where locks are being held
Summary: Depends on D19173. Ref T13096. Adds an optional, disabled-by-default lock log to make it easier to figure out what is acquiring and holding locks.

Test Plan: Ran `bin/lock log --enable`, `--disable`, `--name`, etc. Saw sensible-looking output with log enabled and daemons restarted. Saw no additional output with log disabled and daemons restarted.

Maniphest Tasks: T13096

Differential Revision: https://secure.phabricator.com/D19174
2018-03-05 17:55:34 -08:00

9 lines
424 B
SQL

CREATE TABLE {$NAMESPACE}_daemon.daemon_locklog (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
lockName VARCHAR(64) NOT NULL COLLATE {$COLLATE_TEXT},
lockReleased INT UNSIGNED,
lockParameters LONGTEXT NOT NULL COLLATE {$COLLATE_TEXT},
lockContext LONGTEXT NOT NULL COLLATE {$COLLATE_TEXT},
dateCreated INT UNSIGNED NOT NULL,
dateModified INT UNSIGNED NOT NULL
) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};