From: Alexander Nozdrin Date: May 29 2006 1:30pm Subject: bk commit into 5.0 tree (anozdrin:1.2147) BUG#18023 List-Archive: http://lists.mysql.com/commits/6974 X-Bug: 18023 Message-Id: <20060529133035.EE2CE2BDD5@station.home> 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 see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.2147 06/05/29 17:30:30 anozdrin@stripped +1 -0 Fix for BUG#18023: IM: instance can be started several times; monitor interval must be > 2sec. server-tools/instance-manager/guardian.cc 1.21 06/05/29 17:30:27 anozdrin@stripped +14 -8 Start instance only if it is really crashed. # 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: station.home # Root: /mnt/raid/MySQL/devel/5.0-rt-bug19391 --- 1.20/server-tools/instance-manager/guardian.cc 2006-02-21 15:57:54 +03:00 +++ 1.21/server-tools/instance-manager/guardian.cc 2006-05-29 17:30:27 +04:00 @@ -139,9 +139,12 @@ case JUST_CRASHED: if (current_time - current_node->crash_moment <= 2) { - instance->start(); - log_info("guardian: starting instance %s", - instance->options.instance_name); + if (instance->is_crashed()) + { + instance->start(); + log_info("guardian: starting instance %s", + instance->options.instance_name); + } } else current_node->state= CRASHED; @@ -152,11 +155,14 @@ { if ((current_node->restart_counter < restart_retry)) { - instance->start(); - current_node->last_checked= current_time; - current_node->restart_counter++; - log_info("guardian: restarting instance %s", - instance->options.instance_name); + if (instance->is_crashed()) + { + instance->start(); + current_node->last_checked= current_time; + current_node->restart_counter++; + log_info("guardian: restarting instance %s", + instance->options.instance_name); + } } else current_node->state= CRASHED_AND_ABANDONED;