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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
a0cd739a
Commit
a0cd739a
authored
Feb 21, 2014
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#189 add tokudb_kill_time session variable to set lock tree kill callback frequency
parent
5c9c570e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
11 deletions
+20
-11
storage/tokudb/hatoku_hton.cc
storage/tokudb/hatoku_hton.cc
+3
-0
storage/tokudb/hatoku_hton.h
storage/tokudb/hatoku_hton.h
+17
-11
No files found.
storage/tokudb/hatoku_hton.cc
View file @
a0cd739a
...
@@ -494,6 +494,8 @@ static int tokudb_init_func(void *p) {
...
@@ -494,6 +494,8 @@ static int tokudb_init_func(void *p) {
r
=
db_env
->
set_lock_timeout
(
db_env
,
DEFAULT_TOKUDB_LOCK_TIMEOUT
,
tokudb_get_lock_wait_time_callback
);
r
=
db_env
->
set_lock_timeout
(
db_env
,
DEFAULT_TOKUDB_LOCK_TIMEOUT
,
tokudb_get_lock_wait_time_callback
);
assert
(
r
==
0
);
assert
(
r
==
0
);
db_env
->
set_killed_callback
(
db_env
,
DEFAULT_TOKUDB_KILLED_TIME
,
tokudb_get_killed_time_callback
,
tokudb_killed_callback
);
r
=
db_env
->
get_engine_status_num_rows
(
db_env
,
&
toku_global_status_max_rows
);
r
=
db_env
->
get_engine_status_num_rows
(
db_env
,
&
toku_global_status_max_rows
);
assert
(
r
==
0
);
assert
(
r
==
0
);
...
@@ -1283,6 +1285,7 @@ static struct st_mysql_sys_var *tokudb_system_variables[] = {
...
@@ -1283,6 +1285,7 @@ static struct st_mysql_sys_var *tokudb_system_variables[] = {
MYSQL_SYSVAR
(
lock_timeout_debug
),
MYSQL_SYSVAR
(
lock_timeout_debug
),
MYSQL_SYSVAR
(
loader_memory_size
),
MYSQL_SYSVAR
(
loader_memory_size
),
MYSQL_SYSVAR
(
hide_default_row_format
),
MYSQL_SYSVAR
(
hide_default_row_format
),
MYSQL_SYSVAR
(
killed_time
),
NULL
NULL
};
};
...
...
storage/tokudb/hatoku_hton.h
View file @
a0cd739a
...
@@ -348,18 +348,9 @@ static MYSQL_THDVAR_STR(last_lock_timeout, PLUGIN_VAR_MEMALLOC, "last TokuDB loc
...
@@ -348,18 +348,9 @@ static MYSQL_THDVAR_STR(last_lock_timeout, PLUGIN_VAR_MEMALLOC, "last TokuDB loc
static
MYSQL_THDVAR_BOOL
(
hide_default_row_format
,
0
,
"hide the default row format"
,
NULL
/*check*/
,
NULL
/*update*/
,
true
);
static
MYSQL_THDVAR_BOOL
(
hide_default_row_format
,
0
,
"hide the default row format"
,
NULL
/*check*/
,
NULL
/*update*/
,
true
);
#define DEFAULT_TOKUDB_LOCK_TIMEOUT 4000
/*milliseconds*/
static
const
uint64_t
DEFAULT_TOKUDB_LOCK_TIMEOUT
=
4000
;
/*milliseconds*/
static
MYSQL_THDVAR_ULONGLONG
(
lock_timeout
,
static
MYSQL_THDVAR_ULONGLONG
(
lock_timeout
,
0
,
"TokuDB lock timeout"
,
NULL
,
NULL
,
DEFAULT_TOKUDB_LOCK_TIMEOUT
,
0
/*min*/
,
~
0ULL
/*max*/
,
1
/*blocksize*/
);
0
,
"TokuDB lock timeout"
,
NULL
,
NULL
,
DEFAULT_TOKUDB_LOCK_TIMEOUT
,
/*default*/
0
,
/*min*/
~
0ULL
,
/*max*/
1
/*blocksize*/
);
static
uint64_t
tokudb_get_lock_wait_time_callback
(
uint64_t
default_wait_time
)
{
static
uint64_t
tokudb_get_lock_wait_time_callback
(
uint64_t
default_wait_time
)
{
THD
*
thd
=
current_thd
;
THD
*
thd
=
current_thd
;
...
@@ -384,6 +375,21 @@ static uint64_t tokudb_get_loader_memory_size_callback(void) {
...
@@ -384,6 +375,21 @@ static uint64_t tokudb_get_loader_memory_size_callback(void) {
return
memory_size
;
return
memory_size
;
}
}
static
const
uint64_t
DEFAULT_TOKUDB_KILLED_TIME
=
4000
;
static
MYSQL_THDVAR_ULONGLONG
(
killed_time
,
0
,
"TokuDB killed time"
,
NULL
,
NULL
,
DEFAULT_TOKUDB_KILLED_TIME
,
0
/*min*/
,
~
0ULL
/*max*/
,
1
/*blocksize*/
);
static
uint64_t
tokudb_get_killed_time_callback
(
uint64_t
default_killed_time
)
{
THD
*
thd
=
current_thd
;
uint64_t
killed_time
=
THDVAR
(
thd
,
killed_time
);
return
killed_time
;
}
static
int
tokudb_killed_callback
(
void
)
{
THD
*
thd
=
current_thd
;
return
thd
->
killed
;
}
extern
HASH
tokudb_open_tables
;
extern
HASH
tokudb_open_tables
;
extern
pthread_mutex_t
tokudb_mutex
;
extern
pthread_mutex_t
tokudb_mutex
;
extern
uint32_t
tokudb_write_status_frequency
;
extern
uint32_t
tokudb_write_status_frequency
;
...
...
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