Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
a08bcfd9
Commit
a08bcfd9
authored
May 30, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/home/ram/work/mysql-5.0
parents
934ad5ba
4bf4ff1a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
30 deletions
+40
-30
mysql-test/t/rpl_insert_id.test
mysql-test/t/rpl_insert_id.test
+2
-0
server-tools/instance-manager/guardian.cc
server-tools/instance-manager/guardian.cc
+14
-8
server-tools/instance-manager/manager.cc
server-tools/instance-manager/manager.cc
+24
-22
No files found.
mysql-test/t/rpl_insert_id.test
View file @
a08bcfd9
...
@@ -148,3 +148,5 @@ drop function bug15728_insert;
...
@@ -148,3 +148,5 @@ drop function bug15728_insert;
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
# End of 5.0 tests
# End of 5.0 tests
sync_slave_with_master
;
server-tools/instance-manager/guardian.cc
View file @
a08bcfd9
...
@@ -139,9 +139,12 @@ void Guardian_thread::process_instance(Instance *instance,
...
@@ -139,9 +139,12 @@ void Guardian_thread::process_instance(Instance *instance,
case
JUST_CRASHED
:
case
JUST_CRASHED
:
if
(
current_time
-
current_node
->
crash_moment
<=
2
)
if
(
current_time
-
current_node
->
crash_moment
<=
2
)
{
{
instance
->
start
();
if
(
instance
->
is_crashed
())
log_info
(
"guardian: starting instance %s"
,
{
instance
->
options
.
instance_name
);
instance
->
start
();
log_info
(
"guardian: starting instance %s"
,
instance
->
options
.
instance_name
);
}
}
}
else
else
current_node
->
state
=
CRASHED
;
current_node
->
state
=
CRASHED
;
...
@@ -152,11 +155,14 @@ void Guardian_thread::process_instance(Instance *instance,
...
@@ -152,11 +155,14 @@ void Guardian_thread::process_instance(Instance *instance,
{
{
if
((
current_node
->
restart_counter
<
restart_retry
))
if
((
current_node
->
restart_counter
<
restart_retry
))
{
{
instance
->
start
();
if
(
instance
->
is_crashed
())
current_node
->
last_checked
=
current_time
;
{
current_node
->
restart_counter
++
;
instance
->
start
();
log_info
(
"guardian: restarting instance %s"
,
current_node
->
last_checked
=
current_time
;
instance
->
options
.
instance_name
);
current_node
->
restart_counter
++
;
log_info
(
"guardian: restarting instance %s"
,
instance
->
options
.
instance_name
);
}
}
}
else
else
current_node
->
state
=
CRASHED_AND_ABANDONED
;
current_node
->
state
=
CRASHED_AND_ABANDONED
;
...
...
server-tools/instance-manager/manager.cc
View file @
a08bcfd9
...
@@ -147,28 +147,6 @@ void manager(const Options &options)
...
@@ -147,28 +147,6 @@ void manager(const Options &options)
if
(
create_pid_file
(
options
.
pid_file_name
,
manager_pid
))
if
(
create_pid_file
(
options
.
pid_file_name
,
manager_pid
))
return
;
return
;
sigset_t
mask
;
set_signals
(
&
mask
);
/* create the listener */
{
pthread_t
listener_thd_id
;
pthread_attr_t
listener_thd_attr
;
int
rc
;
pthread_attr_init
(
&
listener_thd_attr
);
pthread_attr_setdetachstate
(
&
listener_thd_attr
,
PTHREAD_CREATE_DETACHED
);
rc
=
set_stacksize_n_create_thread
(
&
listener_thd_id
,
&
listener_thd_attr
,
listener
,
&
listener_args
);
pthread_attr_destroy
(
&
listener_thd_attr
);
if
(
rc
)
{
log_error
(
"manager(): set_stacksize_n_create_thread(listener) failed"
);
goto
err
;
}
}
/* create guardian thread */
/* create guardian thread */
{
{
pthread_t
guardian_thd_id
;
pthread_t
guardian_thd_id
;
...
@@ -211,6 +189,30 @@ void manager(const Options &options)
...
@@ -211,6 +189,30 @@ void manager(const Options &options)
return
;
return
;
}
}
/* Initialize signals and alarm-infrastructure. */
sigset_t
mask
;
set_signals
(
&
mask
);
/* create the listener */
{
pthread_t
listener_thd_id
;
pthread_attr_t
listener_thd_attr
;
int
rc
;
pthread_attr_init
(
&
listener_thd_attr
);
pthread_attr_setdetachstate
(
&
listener_thd_attr
,
PTHREAD_CREATE_DETACHED
);
rc
=
set_stacksize_n_create_thread
(
&
listener_thd_id
,
&
listener_thd_attr
,
listener
,
&
listener_args
);
pthread_attr_destroy
(
&
listener_thd_attr
);
if
(
rc
)
{
log_error
(
"manager(): set_stacksize_n_create_thread(listener) failed"
);
goto
err
;
}
}
/*
/*
After the list of guarded instances have been initialized,
After the list of guarded instances have been initialized,
Guardian should start them.
Guardian should start them.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment