mirror of https://gitee.com/bigwinds/arangodb
fix return value when reboot id cannot be retrieved (#9858)
This commit is contained in:
parent
0599a1c79c
commit
d2efc6cea8
|
@ -334,8 +334,7 @@ bool ServerState::unregister() {
|
||||||
return r.successful();
|
return r.successful();
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultT<uint64_t> ServerState::readRebootIdFromAgency(AgencyComm& comm)
|
ResultT<uint64_t> ServerState::readRebootIdFromAgency(AgencyComm& comm) {
|
||||||
{
|
|
||||||
TRI_ASSERT(!_id.empty());
|
TRI_ASSERT(!_id.empty());
|
||||||
std::string rebootIdPath = "Current/ServersKnown/" + _id + "/rebootId";
|
std::string rebootIdPath = "Current/ServersKnown/" + _id + "/rebootId";
|
||||||
AgencyCommResult result = comm.getValues(rebootIdPath);
|
AgencyCommResult result = comm.getValues(rebootIdPath);
|
||||||
|
@ -344,7 +343,7 @@ ResultT<uint64_t> ServerState::readRebootIdFromAgency(AgencyComm& comm)
|
||||||
LOG_TOPIC("762ed", WARN, Logger::CLUSTER)
|
LOG_TOPIC("762ed", WARN, Logger::CLUSTER)
|
||||||
<< "Could not read back " << rebootIdPath;
|
<< "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);
|
auto slicePath = AgencyCommManager::slicePath(rebootIdPath);
|
||||||
|
|
Loading…
Reference in New Issue