mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'devel' of ssh://github.com/ArangoDB/ArangoDB into devel
This commit is contained in:
commit
9062ff2457
|
@ -424,7 +424,11 @@ Agent& Agent::operator=(VPackSlice const& compaction) {
|
||||||
MUTEX_LOCKER(mutexLocker, _ioLock);
|
MUTEX_LOCKER(mutexLocker, _ioLock);
|
||||||
_spearhead = compaction.get("readDB");
|
_spearhead = compaction.get("readDB");
|
||||||
_readDB = compaction.get("readDB");
|
_readDB = compaction.get("readDB");
|
||||||
_lastCommitIndex = std::stoul(compaction.get("_key").copyString());
|
try {
|
||||||
|
_lastCommitIndex = std::stoul(compaction.get("_key").copyString());
|
||||||
|
} catch (std::exception const& e) {
|
||||||
|
LOG_TOPIC(ERR, Logger::AGENCY) << e.what();
|
||||||
|
}
|
||||||
_nextCompationAfter = _lastCommitIndex + _config.compactionStepSize;
|
_nextCompationAfter = _lastCommitIndex + _config.compactionStepSize;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -294,7 +294,11 @@ bool State::loadCompacted() {
|
||||||
for (auto const& i : VPackArrayIterator(result)) {
|
for (auto const& i : VPackArrayIterator(result)) {
|
||||||
buffer_t tmp = std::make_shared<arangodb::velocypack::Buffer<uint8_t>>();
|
buffer_t tmp = std::make_shared<arangodb::velocypack::Buffer<uint8_t>>();
|
||||||
(*_agent) = i;
|
(*_agent) = i;
|
||||||
_cur = std::stoul(i.get("_key").copyString());
|
try {
|
||||||
|
_cur = std::stoul(i.get("_key").copyString());
|
||||||
|
} catch (std::exception const& e) {
|
||||||
|
LOG_TOPIC(ERR, Logger::AGENCY) << e.what();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -331,7 +335,10 @@ bool State::loadRemaining() {
|
||||||
static_cast<term_t>(i.get("term").getUInt()),
|
static_cast<term_t>(i.get("term").getUInt()),
|
||||||
static_cast<arangodb::consensus::id_t>(i.get("leader").getUInt()),
|
static_cast<arangodb::consensus::id_t>(i.get("leader").getUInt()),
|
||||||
tmp));
|
tmp));
|
||||||
} catch (...) {
|
} catch (std::exception const& e) {
|
||||||
|
LOG_TOPIC(ERR, Logger::AGENCY) <<
|
||||||
|
"Failed to convert " + i.get(StaticStrings::KeyString).copyString() +
|
||||||
|
" to integer via std::stoi." << e.what();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue