mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of https://github.com/arangodb/arangodb into spdvpk
This commit is contained in:
commit
1ca358bde8
|
@ -182,6 +182,8 @@ else ()
|
||||||
set(BASE_FLAGS)
|
set(BASE_FLAGS)
|
||||||
set(BASE_C_FLAGS ${CMAKE_C_FLAGS})
|
set(BASE_C_FLAGS ${CMAKE_C_FLAGS})
|
||||||
set(BASE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
set(BASE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||||
|
set(BASE_LD_FLAGS $ENV{LDFLAGS})
|
||||||
|
set(BASE_LIBS $ENV{LIBS})
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (SOLARIS)
|
if (SOLARIS)
|
||||||
|
@ -226,7 +228,11 @@ if (MSVC)
|
||||||
set(MSVC_LIBS crypt32.lib;WINMM.LIB;Ws2_32.lib;getopt;regex)
|
set(MSVC_LIBS crypt32.lib;WINMM.LIB;Ws2_32.lib;getopt;regex)
|
||||||
|
|
||||||
set(CMAKE_EXE_LINKER_FLAGS
|
set(CMAKE_EXE_LINKER_FLAGS
|
||||||
"${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE /LTCG /SAFESEH:NO /MACHINE:x64 /ignore:4099"
|
"${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:CONSOLE /LTCG /SAFESEH:NO /MACHINE:x64 /ignore:4099 ${BASE_LD_FLAGS}"
|
||||||
|
)
|
||||||
|
else ()
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS
|
||||||
|
"${CMAKE_EXE_LINKER_FLAGS} ${BASE_LD_FLAGS}"
|
||||||
)
|
)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
@ -477,6 +483,14 @@ if (VERBOSE)
|
||||||
message(STATUS "${BASE_CXX_FLAGS}")
|
message(STATUS "${BASE_CXX_FLAGS}")
|
||||||
message(STATUS)
|
message(STATUS)
|
||||||
|
|
||||||
|
message(STATUS "Info BASE_LD_FLAGS")
|
||||||
|
message(STATUS "${BASE_LD_FLAGS}")
|
||||||
|
message(STATUS)
|
||||||
|
|
||||||
|
message(STATUS "Info BASE_LIBS")
|
||||||
|
message(STATUS "${BASE_LIBS}")
|
||||||
|
message(STATUS)
|
||||||
|
|
||||||
message(STATUS "Info CMAKE_C_FLAGS")
|
message(STATUS "Info CMAKE_C_FLAGS")
|
||||||
message(STATUS "${CMAKE_C_FLAGS}")
|
message(STATUS "${CMAKE_C_FLAGS}")
|
||||||
message(STATUS)
|
message(STATUS)
|
||||||
|
@ -700,6 +714,7 @@ list(INSERT SYSTEM_LIBRARIES 0
|
||||||
${ZLIB_LIBS}
|
${ZLIB_LIBS}
|
||||||
${ICU_LIBS}
|
${ICU_LIBS}
|
||||||
${OPENSSL_LIBRARIES}
|
${OPENSSL_LIBRARIES}
|
||||||
|
${BASE_LIBS}
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
${CMAKE_THREAD_LIBS_INIT}
|
||||||
${CMAKE_DL_LIBS}
|
${CMAKE_DL_LIBS}
|
||||||
)
|
)
|
||||||
|
|
|
@ -448,6 +448,7 @@ int ArangoServer::start() {
|
||||||
} else if (_daemonMode) {
|
} else if (_daemonMode) {
|
||||||
return startupDaemon();
|
return startupDaemon();
|
||||||
} else {
|
} else {
|
||||||
|
InitializeWorkMonitor();
|
||||||
_applicationServer->setupLogging(true, false, false);
|
_applicationServer->setupLogging(true, false, false);
|
||||||
|
|
||||||
if (!_pidFile.empty()) {
|
if (!_pidFile.empty()) {
|
||||||
|
@ -1360,7 +1361,6 @@ void ArangoServer::buildApplicationServer() {
|
||||||
}
|
}
|
||||||
|
|
||||||
int ArangoServer::startupServer() {
|
int ArangoServer::startupServer() {
|
||||||
InitializeWorkMonitor();
|
|
||||||
TRI_InitializeStatistics();
|
TRI_InitializeStatistics();
|
||||||
|
|
||||||
OperationMode::server_operation_mode_e mode =
|
OperationMode::server_operation_mode_e mode =
|
||||||
|
|
|
@ -748,6 +748,7 @@ void LogThread::run() {
|
||||||
delete msg;
|
delete msg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
/// @brief LogTopic
|
/// @brief LogTopic
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -1146,7 +1147,7 @@ void Logger::initialize(bool threaded) {
|
||||||
LoggingActive.store(true);
|
LoggingActive.store(true);
|
||||||
|
|
||||||
// generate threaded logging?
|
// generate threaded logging?
|
||||||
ThreadedLogging.store(threaded, std::memory_order_relaxed);
|
ThreadedLogging.store(threaded, std::memory_order_seq_cst);
|
||||||
|
|
||||||
if (threaded) {
|
if (threaded) {
|
||||||
LoggingThread = std::make_unique<LogThread>("Logging");
|
LoggingThread = std::make_unique<LogThread>("Logging");
|
||||||
|
@ -1173,9 +1174,9 @@ void Logger::shutdown(bool clearBuffers) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// logging is now inactive (this will terminate the logging thread)
|
|
||||||
LoggingActive.store(false, std::memory_order_seq_cst);
|
LoggingActive.store(false, std::memory_order_seq_cst);
|
||||||
|
|
||||||
|
// logging is now inactive (this will terminate the logging thread)
|
||||||
// join with the logging thread
|
// join with the logging thread
|
||||||
if (ThreadedLogging) {
|
if (ThreadedLogging) {
|
||||||
// ignore all errors for now as we cannot log them anywhere...
|
// ignore all errors for now as we cannot log them anywhere...
|
||||||
|
|
|
@ -156,10 +156,12 @@ Thread::~Thread() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef TRI_HAVE_POSIX_THREADS
|
||||||
if (_state.load() != ThreadState::DETACHED) {
|
if (_state.load() != ThreadState::DETACHED) {
|
||||||
LOG(FATAL) << "thread is not detached, hard shutdown";
|
LOG(FATAL) << "thread is not detached, hard shutdown";
|
||||||
FATAL_ERROR_EXIT();
|
FATAL_ERROR_EXIT();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Reference in New Issue