Generate a random unique "Request ID" for SSH requests so processes can coordinate better
Summary: Depends on D19247. Ref T13109. When we receive an SSH request, generate a random unique ID for the request. Then thread it down through the process tree. The immediate goal is to let the `ssh-exec` process coordinate with `commit-hook` process and log information about read and write lock wait times. Today, there's no way for `ssh-exec` to interact with the `PushEvent`, but this is the most helpful place to store this data for users. Test Plan: Made pushes, saw the `PushEvent` table populate with a random request ID. Exported data and saw the ID preserved in the export. Maniphest Tasks: T13109 Differential Revision: https://secure.phabricator.com/D19249
This commit is contained in:
@@ -101,6 +101,9 @@ final class PhabricatorRepositoryPushLogSearchEngine
|
||||
$fields[] = id(new PhabricatorIDExportField())
|
||||
->setKey('pushID')
|
||||
->setLabel(pht('Push ID')),
|
||||
$fields[] = id(new PhabricatorStringExportField())
|
||||
->setKey('unique')
|
||||
->setLabel(pht('Unique')),
|
||||
$fields[] = id(new PhabricatorStringExportField())
|
||||
->setKey('protocol')
|
||||
->setLabel(pht('Protocol')),
|
||||
@@ -209,6 +212,7 @@ final class PhabricatorRepositoryPushLogSearchEngine
|
||||
|
||||
$map = array(
|
||||
'pushID' => $event->getID(),
|
||||
'unique' => $event->getRequestIdentifier(),
|
||||
'protocol' => $event->getRemoteProtocol(),
|
||||
'repositoryPHID' => $repository_phid,
|
||||
'repository' => $repository_name,
|
||||
|
||||
Reference in New Issue
Block a user