1
0
Fork 0

fix reading of initial tick values from RocksDB

This commit is contained in:
jsteemann 2017-04-28 14:28:13 +02:00
parent 12df8249b3
commit 502d3ee354
1 changed files with 2 additions and 4 deletions

View File

@ -229,10 +229,8 @@ void RocksDBCounterManager::readSettings() {
if (!result.empty()) { if (!result.empty()) {
try { try {
std::shared_ptr<VPackBuilder> builder = VPackParser::fromJson(result); uint64_t lastTick = basics::VelocyPackHelper::stringUInt64(slice.get("tick"));
VPackSlice s = builder->slice(); LOG_TOPIC(TRACE, Logger::ENGINES) << "using last tick: " << lastTick;
uint64_t lastTick = basics::VelocyPackHelper::stringUInt64(s.get("tick"));
TRI_UpdateTickServer(lastTick); TRI_UpdateTickServer(lastTick);
} catch (...) { } catch (...) {
LOG_TOPIC(WARN, Logger::ENGINES) << "unable to read initial settings: invalid data"; LOG_TOPIC(WARN, Logger::ENGINES) << "unable to read initial settings: invalid data";