1
0
Fork 0

remove useless checks

This commit is contained in:
Jan Steemann 2016-04-18 18:11:28 +02:00
parent 8430f1f71c
commit aaf6176347
1 changed files with 1 additions and 16 deletions

View File

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