diff --git a/arangod/Wal/LogfileManager.cpp b/arangod/Wal/LogfileManager.cpp index 48b9c36d58..3cd7baa9d6 100644 --- a/arangod/Wal/LogfileManager.cpp +++ b/arangod/Wal/LogfileManager.cpp @@ -488,6 +488,7 @@ void LogfileManager::stop() { // this prevents creating new (empty) WAL logfile once we flush // current logfile stopAllocatorThread(); + if (_allocatorThread != nullptr) { LOG(TRACE) << "stopping allocator thread"; while (_allocatorThread->isRunning()) { @@ -1851,10 +1852,6 @@ int LogfileManager::writeShutdownInfo(bool writeShutdownTime) { int LogfileManager::startSynchronizerThread() { _synchronizerThread = new SynchronizerThread(this, _syncInterval); - if (_synchronizerThread == nullptr) { - return TRI_ERROR_INTERNAL; - } - if (!_synchronizerThread->start()) { delete _synchronizerThread; return TRI_ERROR_INTERNAL; @@ -1876,10 +1873,6 @@ void LogfileManager::stopSynchronizerThread() { int LogfileManager::startAllocatorThread() { _allocatorThread = new AllocatorThread(this); - if (_allocatorThread == nullptr) { - return TRI_ERROR_INTERNAL; - } - if (!_allocatorThread->start()) { delete _allocatorThread; return TRI_ERROR_INTERNAL; @@ -1901,10 +1894,6 @@ void LogfileManager::stopAllocatorThread() { int LogfileManager::startCollectorThread() { _collectorThread = new CollectorThread(this, _server); - if (_collectorThread == nullptr) { - return TRI_ERROR_INTERNAL; - } - if (!_collectorThread->start()) { delete _collectorThread; return TRI_ERROR_INTERNAL; @@ -1926,10 +1915,6 @@ void LogfileManager::stopCollectorThread() { int LogfileManager::startRemoverThread() { _removerThread = new RemoverThread(this); - if (_removerThread == nullptr) { - return TRI_ERROR_INTERNAL; - } - if (!_removerThread->start()) { delete _removerThread; return TRI_ERROR_INTERNAL;