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
056b8ee3
Commit
056b8ee3
authored
Oct 15, 2013
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#127 make tokudb_loader_memory_size a session variable
parent
25a2ba5d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
14 deletions
+18
-14
storage/tokudb/hatoku_hton.cc
storage/tokudb/hatoku_hton.cc
+1
-14
storage/tokudb/hatoku_hton.h
storage/tokudb/hatoku_hton.h
+17
-0
No files found.
storage/tokudb/hatoku_hton.cc
View file @
056b8ee3
...
@@ -181,7 +181,6 @@ void toku_hton_update_primary_key_bytes_inserted(uint64_t row_size) {
...
@@ -181,7 +181,6 @@ void toku_hton_update_primary_key_bytes_inserted(uint64_t row_size) {
static
void
tokudb_lock_timeout_callback
(
DB
*
db
,
uint64_t
requesting_txnid
,
const
DBT
*
left_key
,
const
DBT
*
right_key
,
uint64_t
blocking_txnid
);
static
void
tokudb_lock_timeout_callback
(
DB
*
db
,
uint64_t
requesting_txnid
,
const
DBT
*
left_key
,
const
DBT
*
right_key
,
uint64_t
blocking_txnid
);
static
ulong
tokudb_cleaner_period
;
static
ulong
tokudb_cleaner_period
;
static
ulong
tokudb_cleaner_iterations
;
static
ulong
tokudb_cleaner_iterations
;
static
ulonglong
tokudb_loader_memory_size
;
#define ASSERT_MSGLEN 1024
#define ASSERT_MSGLEN 1024
...
@@ -457,7 +456,7 @@ static int tokudb_init_func(void *p) {
...
@@ -457,7 +456,7 @@ static int tokudb_init_func(void *p) {
db_env_set_direct_io
(
tokudb_directio
==
TRUE
);
db_env_set_direct_io
(
tokudb_directio
==
TRUE
);
db_env
->
change_fsync_log_period
(
db_env
,
tokudb_fsync_log_period
);
db_env
->
change_fsync_log_period
(
db_env
,
tokudb_fsync_log_period
);
db_env
->
set_lock_timeout_callback
(
db_env
,
tokudb_lock_timeout_callback
);
db_env
->
set_lock_timeout_callback
(
db_env
,
tokudb_lock_timeout_callback
);
db_env
->
set_loader_memory_size
(
db_env
,
tokudb_
loader_memory_size
);
db_env
->
set_loader_memory_size
(
db_env
,
tokudb_
get_loader_memory_size_callback
);
r
=
db_env
->
open
(
db_env
,
tokudb_home
,
tokudb_init_flags
,
S_IRUSR
|
S_IWUSR
|
S_IRGRP
|
S_IWGRP
|
S_IROTH
|
S_IWOTH
);
r
=
db_env
->
open
(
db_env
,
tokudb_home
,
tokudb_init_flags
,
S_IRUSR
|
S_IWUSR
|
S_IRGRP
|
S_IWGRP
|
S_IROTH
|
S_IWOTH
);
...
@@ -1237,18 +1236,6 @@ static void tokudb_fsync_log_period_update(THD *thd, struct st_mysql_sys_var *sy
...
@@ -1237,18 +1236,6 @@ static void tokudb_fsync_log_period_update(THD *thd, struct st_mysql_sys_var *sy
static
MYSQL_SYSVAR_UINT
(
fsync_log_period
,
tokudb_fsync_log_period
,
0
,
"TokuDB fsync log period"
,
NULL
,
tokudb_fsync_log_period_update
,
0
,
0
,
~
0U
,
0
);
static
MYSQL_SYSVAR_UINT
(
fsync_log_period
,
tokudb_fsync_log_period
,
0
,
"TokuDB fsync log period"
,
NULL
,
tokudb_fsync_log_period_update
,
0
,
0
,
~
0U
,
0
);
static
void
tokudb_update_loader_memory_size
(
THD
*
thd
,
struct
st_mysql_sys_var
*
sys_var
,
void
*
var
,
const
void
*
save
)
{
ulonglong
*
p
=
(
ulonglong
*
)
var
;
*
p
=
*
(
const
ulonglong
*
)
save
;
db_env
->
set_loader_memory_size
(
db_env
,
*
p
);
}
static
MYSQL_SYSVAR_ULONGLONG
(
loader_memory_size
,
tokudb_loader_memory_size
,
0
,
"TokuDB loader memory size"
,
NULL
,
tokudb_update_loader_memory_size
,
100
*
1000
*
1000
/*default*/
,
0
/*min*/
,
~
0ULL
/*max*/
,
0
);
static
struct
st_mysql_sys_var
*
tokudb_system_variables
[]
=
{
static
struct
st_mysql_sys_var
*
tokudb_system_variables
[]
=
{
MYSQL_SYSVAR
(
cache_size
),
MYSQL_SYSVAR
(
cache_size
),
...
...
storage/tokudb/hatoku_hton.h
View file @
056b8ee3
...
@@ -360,6 +360,23 @@ static uint64_t tokudb_get_lock_wait_time_callback(uint64_t default_wait_time) {
...
@@ -360,6 +360,23 @@ static uint64_t tokudb_get_lock_wait_time_callback(uint64_t default_wait_time) {
return
wait_time
;
return
wait_time
;
}
}
static
MYSQL_THDVAR_ULONGLONG
(
loader_memory_size
,
0
,
"TokuDB loader memory size"
,
NULL
,
NULL
,
100
*
1000
*
1000
,
/*default*/
0
,
/*min*/
~
0ULL
,
/*max*/
1
/*blocksize*/
);
static
uint64_t
tokudb_get_loader_memory_size_callback
(
void
)
{
THD
*
thd
=
current_thd
;
uint64_t
memory_size
=
THDVAR
(
thd
,
loader_memory_size
);
return
memory_size
;
}
extern
HASH
tokudb_open_tables
;
extern
HASH
tokudb_open_tables
;
extern
pthread_mutex_t
tokudb_mutex
;
extern
pthread_mutex_t
tokudb_mutex
;
extern
pthread_mutex_t
tokudb_meta_mutex
;
extern
pthread_mutex_t
tokudb_meta_mutex
;
...
...
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