Below is the list of changes that have just been committed into a local
5.0 repository of alik. When alik does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
1.2170 06/06/06 15:19:09 anozdrin@stripped +3 -0
The second fix for BUG#19391: IM fails to start after two executions.
1.34 06/06/06 15:19:05 anozdrin@stripped +31 -12
Make initialization of alarm infrustructure before starting Guardian
thread, because Guardian uses thr_alarm().
1.27 06/06/06 15:19:05 anozdrin@stripped +1 -1
Added TODO comment.
1.22 06/06/06 15:19:05 anozdrin@stripped +0 -3
Removed erroneous unlock() in Guardian_thread::init():
instance_map is unlocked in the caller.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: anozdrin
# Host: booka
# Root: /home/alik/MySQL/devel/5.0-rt-bug18023
--- 1.33/server-tools/instance-manager/manager.cc 2006-05-29 17:26:50 +04:00
+++ 1.34/server-tools/instance-manager/manager.cc 2006-06-06 15:19:05 +04:00
@@ -147,6 +147,25 @@ void manager(const Options &options)
if (create_pid_file(options.pid_file_name, manager_pid))
+ Initialize signals and alarm-infrastructure.
+ NOTE: To work nicely with LinuxThreads, the signal thread is the first
+ thread in the process.
+ After init_thr_alarm() call it's possible to call thr_alarm() (from
+ different threads), that results in sending ALARM signal to the alarm
+ thread (which can be the main thread). That signal can interrupt
+ blocking calls.
+ In other words, a blocking call can be interrupted in the main thread
+ after init_thr_alarm().
+ sigset_t mask;
/* create guardian thread */
@@ -154,9 +173,16 @@ void manager(const Options &options)
- NOTE: Guardian should be shutdown first. Only then all other threads
- need to be stopped. This should be done, as guardian is responsible for
- shutting down the instances, and this is a long operation.
+ NOTE: Guardian should be shutdown first. Only then all other threads
+ need to be stopped. This should be done, as guardian is responsible
+ for shutting down the instances, and this is a long operation.
+ NOTE: Guardian uses thr_alarm() when detects current state of
+ instances (is_running()), but it is not interfere with
+ flush_instances() later in the code, because until flush_instances()
+ complete in the main thread, Guardian thread is not permitted to
+ process instances. And before flush_instances() there is no instances
+ to proceed.
@@ -172,10 +198,8 @@ void manager(const Options &options)
- To work nicely with LinuxThreads, the signal thread is the first thread
- in the process.
+ /* Load instances. */
@@ -188,11 +212,6 @@ void manager(const Options &options)
- /* Initialize signals and alarm-infrastructure. */
- sigset_t mask;
/* create the listener */
--- 1.21/server-tools/instance-manager/guardian.cc 2006-05-29 17:30:27 +04:00
+++ 1.22/server-tools/instance-manager/guardian.cc 2006-06-06 15:19:05 +04:00
@@ -271,10 +271,7 @@ int Guardian_thread::init()
if (guard(instance, TRUE)) /* do not lock guardian */
--- 1.26/server-tools/instance-manager/instance_map.cc 2006-02-21 15:59:35 +03:00
+++ 1.27/server-tools/instance-manager/instance_map.cc 2006-06-06 15:19:05 +04:00
@@ -215,7 +215,7 @@ int Instance_map::flush_instances()
hash_init(&hash, default_charset_info, START_HASH_SIZE, 0, 0,
get_instance_key, delete_instance, 0);
+ guardian->init(); // TODO: check error status.
|• bk commit into 5.0 tree (anozdrin:1.2170) BUG#19391||Alexander Nozdrin||6 Jun|