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
61ca3cf5
Commit
61ca3cf5
authored
Jul 31, 2017
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post-merge fix: Rdb_io_watchdog doesn't support windows
So disable it there for now.
parent
1388afcd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
3 deletions
+26
-3
storage/rocksdb/CMakeLists.txt
storage/rocksdb/CMakeLists.txt
+11
-1
storage/rocksdb/ha_rocksdb.cc
storage/rocksdb/ha_rocksdb.cc
+11
-2
storage/rocksdb/rdb_io_watchdog.h
storage/rocksdb/rdb_io_watchdog.h
+4
-0
No files found.
storage/rocksdb/CMakeLists.txt
View file @
61ca3cf5
...
...
@@ -126,7 +126,7 @@ endif()
INCLUDE
(
build_rocksdb.cmake
)
ADD_CONVENIENCE_LIBRARY
(
rocksdb_aux_lib
set
(
rocksdb_aux_lib_sources
ha_rocksdb_proto.h
logger.h
rdb_comparator.h
...
...
@@ -143,6 +143,16 @@ ADD_CONVENIENCE_LIBRARY(rocksdb_aux_lib
rdb_mariadb_port.h
)
if
(
WIN32
)
else
()
list
(
APPEND rocksdb_aux_lib_sources
rdb_io_watchdog.cc
rdb_io_watchdog.h
)
endif
()
ADD_CONVENIENCE_LIBRARY
(
rocksdb_aux_lib
${
rocksdb_aux_lib_sources
}
)
ADD_DEPENDENCIES
(
rocksdb_aux_lib GenError
)
# MARIAROCKS-TODO: how to properly depend on -lrt ?
...
...
storage/rocksdb/ha_rocksdb.cc
View file @
61ca3cf5
...
...
@@ -164,8 +164,10 @@ Rdb_cf_manager cf_manager;
Rdb_ddl_manager
ddl_manager
;
const
char
*
m_mysql_gtid
;
Rdb_binlog_manager
binlog_manager
;
Rdb_io_watchdog
*
io_watchdog
=
nullptr
;
#ifndef _WIN32
Rdb_io_watchdog
*
io_watchdog
=
nullptr
;
#endif
/**
MyRocks background thread control
N.B. This is besides RocksDB's own background threads
...
...
@@ -544,15 +546,18 @@ static void rocksdb_set_io_write_timeout(
void
*
const
var_ptr
MY_ATTRIBUTE
((
__unused__
)),
const
void
*
const
save
)
{
DBUG_ASSERT
(
save
!=
nullptr
);
DBUG_ASSERT
(
rdb
!=
nullptr
);
#ifndef _WIN32
DBUG_ASSERT
(
io_watchdog
!=
nullptr
);
#endif
RDB_MUTEX_LOCK_CHECK
(
rdb_sysvars_mutex
);
const
uint32_t
new_val
=
*
static_cast
<
const
uint32_t
*>
(
save
);
rocksdb_io_write_timeout_secs
=
new_val
;
#ifndef _WIN32
io_watchdog
->
reset_timeout
(
rocksdb_io_write_timeout_secs
);
#endif
RDB_MUTEX_UNLOCK_CHECK
(
rdb_sysvars_mutex
);
}
...
...
@@ -3971,8 +3976,10 @@ static int rocksdb_init_func(void *const p) {
directories
.
push_back
(
myrocks
::
rocksdb_wal_dir
);
}
#ifndef _WIN32
io_watchdog
=
new
Rdb_io_watchdog
(
directories
);
io_watchdog
->
reset_timeout
(
rocksdb_io_write_timeout_secs
);
#endif
// NO_LINT_DEBUG
sql_print_information
(
"MyRocks storage engine plugin has been successfully "
...
...
@@ -4061,8 +4068,10 @@ static int rocksdb_done_func(void *const p) {
delete
commit_latency_stats
;
commit_latency_stats
=
nullptr
;
#ifndef _WIN32
delete
io_watchdog
;
io_watchdog
=
nullptr
;
#endif
// Disown the cache data since we're shutting down.
// This results in memory leaks but it improved the shutdown time.
...
...
storage/rocksdb/rdb_io_watchdog.h
View file @
61ca3cf5
...
...
@@ -34,6 +34,9 @@
namespace
myrocks
{
// Rdb_io_watchdog does not support Windows ATM.
#ifndef _WIN32
class
Rdb_io_watchdog
{
const
int
RDB_IO_WRITE_BUFFER_SIZE
=
4096
;
const
char
*
const
RDB_IO_DUMMY_FILE_NAME
=
"myrocks_io_watchdog_write_file"
;
...
...
@@ -110,4 +113,5 @@ class Rdb_io_watchdog {
Rdb_io_watchdog
&
operator
=
(
const
Rdb_io_watchdog
&
)
=
delete
;
};
#endif
}
// namespace myrocks
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