Differential D18834 Diff 45188 src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/storage/management/workflow/PhabricatorStorageManagementDumpWorkflow.php
Show First 20 Lines • Show All 181 Lines • ▼ Show 20 Lines | if ($args->getArg('for-replica')) { | ||||
$argv[] = '--master-data'; | $argv[] = '--master-data'; | ||||
} | } | ||||
$argv[] = '-u'; | $argv[] = '-u'; | ||||
$argv[] = $api->getUser(); | $argv[] = $api->getUser(); | ||||
$argv[] = '-h'; | $argv[] = '-h'; | ||||
$argv[] = $host; | $argv[] = $host; | ||||
// MySQL's default "max_allowed_packet" setting is fairly conservative | |||||
// (16MB). If we try to dump a row which is larger than this limit, the | |||||
// dump will fail. | |||||
// We encourage users to increase this limit during setup, but modifying | |||||
// the "[mysqld]" section of the configuration file (instead of | |||||
// "[mysqldump]" section) won't apply to "mysqldump" and we can not easily | |||||
// detect what the "mysqldump" setting is. | |||||
// Since no user would ever reasonably want a dump to fail because a row | |||||
// was too large, just manually force this setting to the largest supported | |||||
// value. | |||||
$argv[] = '--max-allowed-packet'; | |||||
$argv[] = '1G'; | |||||
if ($port) { | if ($port) { | ||||
$argv[] = '--port'; | $argv[] = '--port'; | ||||
$argv[] = $port; | $argv[] = $port; | ||||
} | } | ||||
$commands = array(); | $commands = array(); | ||||
foreach ($targets as $target) { | foreach ($targets as $target) { | ||||
$target_argv = $argv; | $target_argv = $argv; | ||||
▲ Show 20 Lines • Show All 147 Lines • Show Last 20 Lines |