mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
post-review fixes + cleanup + some minor fixes
server-tools/instance-manager/buffer.cc: coding style fixes server-tools/instance-manager/buffer.h: wrong constructor initialisation fixed server-tools/instance-manager/commands.cc: cleanup server-tools/instance-manager/guardian.cc: cleanup + added lock/unlock routines server-tools/instance-manager/guardian.h: GUARD_NODE moved to the header server-tools/instance-manager/instance.cc: Fix for the linuxthreads/POSIX signal handling problem (see comments in the code) server-tools/instance-manager/instance.h: condition variable renamed and commented server-tools/instance-manager/instance_map.cc: We need to refresh guardian during flush_instances server-tools/instance-manager/instance_map.h: removed obsolete function declaration server-tools/instance-manager/instance_options.cc: added caching of computed values server-tools/instance-manager/instance_options.h: added vars to cache some option values server-tools/instance-manager/listener.cc: check whether we are running on the linux threads server-tools/instance-manager/manager.cc: lock guardian before init() server-tools/instance-manager/parse_output.cc: cleanup server-tools/instance-manager/priv.cc: added global variables to detect whether we are running on the LinuxThreads server-tools/instance-manager/priv.h: added global variables to detect whether we are running on the LinuxThreads
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "manager.h"
|
||||
|
||||
#include "priv.h"
|
||||
#include "thread_registry.h"
|
||||
#include "listener.h"
|
||||
#include "instance_map.h"
|
||||
@@ -75,11 +76,13 @@ void manager(const Options &options)
|
||||
Listener_thread_args listener_args(thread_registry, options, user_map,
|
||||
instance_map);
|
||||
|
||||
manager_pid= getpid();
|
||||
instance_map.guardian= &guardian_thread;
|
||||
|
||||
if (instance_map.init() || user_map.init())
|
||||
return;
|
||||
|
||||
|
||||
if (instance_map.load())
|
||||
{
|
||||
log_error("Cannot init instances repository. This might be caused by "
|
||||
@@ -170,7 +173,12 @@ void manager(const Options &options)
|
||||
*/
|
||||
init_thr_alarm(10);
|
||||
/* init list of guarded instances */
|
||||
guardian_thread.lock();
|
||||
|
||||
guardian_thread.init();
|
||||
|
||||
guardian_thread.unlock();
|
||||
|
||||
/*
|
||||
After the list of guarded instances have been initialized,
|
||||
Guardian should start them.
|
||||
|
||||
Reference in New Issue
Block a user