1
0
Fork 0

fix return value when reboot id cannot be retrieved (#9858)

This commit is contained in:
Jan 2019-08-30 11:26:00 +02:00 committed by KVS85
parent 0599a1c79c
commit d2efc6cea8
1 changed files with 2 additions and 3 deletions

View File

@ -334,8 +334,7 @@ bool ServerState::unregister() {
return r.successful();
}
ResultT<uint64_t> ServerState::readRebootIdFromAgency(AgencyComm& comm)
{
ResultT<uint64_t> ServerState::readRebootIdFromAgency(AgencyComm& comm) {
TRI_ASSERT(!_id.empty());
std::string rebootIdPath = "Current/ServersKnown/" + _id + "/rebootId";
AgencyCommResult result = comm.getValues(rebootIdPath);
@ -344,7 +343,7 @@ ResultT<uint64_t> ServerState::readRebootIdFromAgency(AgencyComm& comm)
LOG_TOPIC("762ed", WARN, Logger::CLUSTER)
<< "Could not read back " << rebootIdPath;
ResultT<uint64_t>::error(TRI_ERROR_INTERNAL, "could not read rebootId from agency");
return ResultT<uint64_t>::error(TRI_ERROR_INTERNAL, "could not read rebootId from agency");
}
auto slicePath = AgencyCommManager::slicePath(rebootIdPath);