1
0
Fork 0

go on in case of errors

This commit is contained in:
jsteemann 2017-05-04 23:32:17 +02:00
parent 4ea26cd10f
commit e79f9779b3
1 changed files with 25 additions and 19 deletions

View File

@ -52,6 +52,7 @@ void RocksDBBackgroundThread::run() {
guard.wait(static_cast<uint64_t>(_interval * 1000000.0));
}
try {
if (!isStopping()) {
_engine->counterManager()->sync(false);
}
@ -75,6 +76,11 @@ void RocksDBBackgroundThread::run() {
});
_engine->pruneWalFiles(minTick);
}
} catch (std::exception const& ex) {
LOG_TOPIC(WARN, Logger::FIXME) << "caught exception in rocksdb background thread: " << ex.what();
} catch (...) {
LOG_TOPIC(WARN, Logger::FIXME) << "caught unknown exception in rocksdb background";
}
}
_engine->counterManager()->sync(true); // final write on shutdown
}