MXS-1929: Load global configuration as soon as possible

There exists a dependency on the configuration for the workers: the total
number of worker thread is defined by the `threads` parameter. This means
that the global configuration section must be read before workers are
started.

Commit 411b70e25656317909e54f748f8012593120041f broke MaxScale and turned
it into a single threaded application as the default configuration value
of one worker was used.
This commit is contained in:
Markus Mäkelä
2018-07-26 08:34:56 +03:00
parent 7e857e36eb
commit a833f39196
3 changed files with 49 additions and 24 deletions

View File

@ -1890,6 +1890,12 @@ int main(int argc, char **argv)
}
}
if (!config_load_global(cnf_file_path))
{
rc = MAXSCALE_BADCONFIG;
goto return_main;
}
if (daemon_mode)
{
if (!change_cwd())