mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
MDEV-13585: RocksDB plugin fails to build on macOS because of unknown type timer_t
etc.
Rdb_io_watchdog can not be built on OS X. Disable it.
This commit is contained in:
parent
4ae200a97a
commit
80c90887fe
4 changed files with 14 additions and 9 deletions
|
@ -146,7 +146,10 @@ ADD_CONVENIENCE_LIBRARY(rocksdb_aux_lib
|
|||
ADD_DEPENDENCIES(rocksdb_aux_lib GenError)
|
||||
|
||||
# MARIAROCKS-TODO: how to properly depend on -lrt ?
|
||||
TARGET_LINK_LIBRARIES(rocksdb_aux_lib rocksdblib ${ZLIB_LIBRARY} -lrt)
|
||||
TARGET_LINK_LIBRARIES(rocksdb_aux_lib rocksdblib ${ZLIB_LIBRARY})
|
||||
if (UNIX AND NOT APPLE)
|
||||
TARGET_LINK_LIBRARIES(rocksdb_aux_lib -lrt)
|
||||
endif()
|
||||
|
||||
TARGET_LINK_LIBRARIES(rocksdb rocksdb_aux_lib)
|
||||
|
||||
|
@ -182,7 +185,9 @@ ENDIF()
|
|||
# ADD_SUBDIRECTORY(unittest)
|
||||
#ENDIF()
|
||||
|
||||
SET(rocksdb_static_libs ${rocksdb_static_libs} "-lrt")
|
||||
if (UNIX AND NOT APPLE)
|
||||
SET(rocksdb_static_libs ${rocksdb_static_libs} "-lrt")
|
||||
endif()
|
||||
|
||||
ADD_LIBRARY(rocksdb_tools STATIC
|
||||
rocksdb/tools/ldb_tool.cc
|
||||
|
|
|
@ -173,7 +173,7 @@ Rdb_ddl_manager ddl_manager;
|
|||
const char *m_mysql_gtid;
|
||||
Rdb_binlog_manager binlog_manager;
|
||||
|
||||
#ifndef _WIN32
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
Rdb_io_watchdog *io_watchdog = nullptr;
|
||||
#endif
|
||||
/**
|
||||
|
@ -554,7 +554,7 @@ 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
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
DBUG_ASSERT(io_watchdog != nullptr);
|
||||
#endif
|
||||
|
||||
|
@ -563,7 +563,7 @@ static void rocksdb_set_io_write_timeout(
|
|||
const uint32_t new_val = *static_cast<const uint32_t *>(save);
|
||||
|
||||
rocksdb_io_write_timeout_secs = new_val;
|
||||
#ifndef _WIN32
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
io_watchdog->reset_timeout(rocksdb_io_write_timeout_secs);
|
||||
#endif
|
||||
RDB_MUTEX_UNLOCK_CHECK(rdb_sysvars_mutex);
|
||||
|
@ -3984,7 +3984,7 @@ static int rocksdb_init_func(void *const p) {
|
|||
directories.push_back(myrocks::rocksdb_wal_dir);
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
io_watchdog = new Rdb_io_watchdog(directories);
|
||||
io_watchdog->reset_timeout(rocksdb_io_write_timeout_secs);
|
||||
#endif
|
||||
|
@ -4076,7 +4076,7 @@ static int rocksdb_done_func(void *const p) {
|
|||
delete commit_latency_stats;
|
||||
commit_latency_stats = nullptr;
|
||||
|
||||
#ifndef _WIN32
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
delete io_watchdog;
|
||||
io_watchdog = nullptr;
|
||||
#endif
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <vector>
|
||||
|
||||
/* Rdb_io_watchdog doesn't work on Windows [yet] */
|
||||
#ifndef _WIN32
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
|
||||
namespace myrocks {
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
namespace myrocks {
|
||||
|
||||
// Rdb_io_watchdog does not support Windows ATM.
|
||||
#ifndef _WIN32
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
|
||||
class Rdb_io_watchdog {
|
||||
const int RDB_IO_WRITE_BUFFER_SIZE = 4096;
|
||||
|
|
Loading…
Add table
Reference in a new issue