add config wait rotate ready max_try
This commit is contained in:
parent
818805e624
commit
5bea8c8869
|
@ -58,8 +58,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE 1)
|
|||
## ensure that the build results can be run on systems with lower libstdc++ version than the build system
|
||||
add_compile_definitions($<$<COMPILE_LANGUAGE:CXX>:_GLIBCXX_USE_CXX11_ABI=0>)
|
||||
link_directories(${CXX_LIB_DIR} ${GCC_LIB_DIR})
|
||||
add_link_options($<$<COMPILE_LANGUAGE:CXX>:-static-libstdc++>)
|
||||
add_link_options($<$<COMPILE_LANGUAGE:CXX,C>:-static-libgcc>)
|
||||
add_link_options(-static-libstdc++ -static-libgcc)
|
||||
|
||||
if (WITH_ASAN)
|
||||
add_compile_options(-fsanitize=address -fno-omit-frame-pointer)
|
||||
|
@ -84,28 +83,27 @@ if (OS_ARCH STREQUAL "x86_64")
|
|||
add_compile_options($<$<COMPILE_LANGUAGE:CXX,C>:-m64>)
|
||||
endif ()
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX,C>:-pipe>)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX,C>:-fPIC>)
|
||||
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX,C>:-pie>)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX,C>:-znoexecstack>)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX,C>:-znow>)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fPIC>)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:C>:-fPIC>)
|
||||
add_link_options(-Wl,-z,noexecstack -Wl,-z,now)
|
||||
|
||||
add_link_options(-lm)
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
add_link_options(-lrt)
|
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
add_link_options($<$<COMPILE_LANGUAGE:CXX,C>:
|
||||
"-framework CoreFoundation"
|
||||
"-framework CoreGraphics"
|
||||
"-framework CoreData"
|
||||
"-framework CoreText"
|
||||
"-framework Security"
|
||||
"-framework Foundation"
|
||||
add_link_options(
|
||||
"-framework" "CoreFoundation"
|
||||
"-framework" "CoreGraphics"
|
||||
"-framework" "CoreData"
|
||||
"-framework" "CoreText"
|
||||
"-framework" "Security"
|
||||
"-framework" "Foundation"
|
||||
"-Wl,-U,_MallocExtension_ReleaseFreeMemory"
|
||||
"-Wl,-U,_ProfilerStart"
|
||||
"-Wl,-U,_ProfilerStop")
|
||||
"-Wl,-U,_ProfilerStop"
|
||||
)
|
||||
endif ()
|
||||
|
||||
include(ProcessorCount)
|
||||
message(STATUS "NUM_OF_PROCESSOR: ${NUM_OF_PROCESSOR}")
|
||||
ProcessorCount(NUM_OF_PROCESSOR)
|
||||
ProcessorCount(NUM_OF_PROCESSOR)
|
||||
message(STATUS "NUM_OF_PROCESSOR: ${NUM_OF_PROCESSOR}")
|
|
@ -64,5 +64,6 @@
|
|||
"binlog_ddl_convert": true,
|
||||
"binlog_memory_limit": "3G",
|
||||
"binlog_working_mode": "storage",
|
||||
"binlog_recover_backup": true
|
||||
"binlog_recover_backup": true,
|
||||
"wait_rotate_ready_max_try": 1000
|
||||
}
|
|
@ -974,13 +974,14 @@ void BinlogDumper::wait_rotate_ready(std::string const& file) const
|
|||
{
|
||||
|
||||
int retry = 0;
|
||||
while (!FsUtil::exist(file) && retry < 100) {
|
||||
while ((!FsUtil::exist(file) || FsUtil::file_size(file) < BINLOG_MAGIC_SIZE) &&
|
||||
retry < logproxy::Config::instance().wait_rotate_ready_max_try.val()) {
|
||||
OMS_WARN("{}: The currently rotated file {} is not ready", _connection->trace_id(), file);
|
||||
usleep(10000);
|
||||
retry++;
|
||||
}
|
||||
|
||||
if (!FsUtil::exist(file)) {
|
||||
if (!FsUtil::exist(file) || FsUtil::file_size(file) < BINLOG_MAGIC_SIZE) {
|
||||
OMS_ERROR("{}: The currently rotated file {} is not exist", _connection->trace_id(), file);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ int DdlConverter::convert(const std::string& source, std::string& dest)
|
|||
OMS_STREAM_INFO << "convert ddl source sql:[ " << source << " ]";
|
||||
|
||||
std::string err_msg;
|
||||
int result = etransfer::tool::ConvertTool::Parse(source, "", false, dest, err_msg);
|
||||
int result = etransfer::tool::ConvertTool::Parse(source, "", true, dest, err_msg);
|
||||
if (result == 0) {
|
||||
// success
|
||||
OMS_STREAM_INFO << "convert ddl success source sql:[ " << source << " ], dest sql:[ " << dest << " ]";
|
||||
|
|
|
@ -160,6 +160,7 @@ public:
|
|||
* When restoring binlog breakpoint, whether to enable backup?
|
||||
*/
|
||||
OMS_CONFIG_BOOL(binlog_recover_backup, true);
|
||||
OMS_CONFIG_UINT64(wait_rotate_ready_max_try, 1000);
|
||||
// for test
|
||||
OMS_CONFIG_STR(table_whitelist, "");
|
||||
OMS_CONFIG_UINT32(node_mem_limit_minimum_mb, 2048);
|
||||
|
|
Loading…
Reference in New Issue