Fix version status reporting

This commit is contained in:
Bharadwaj V.R 2022-04-15 09:52:42 -07:00
parent 3787ddae89
commit 576957d335
1 changed files with 3 additions and 1 deletions

View File

@ -1551,13 +1551,15 @@ ACTOR Future<ProtocolVersion> getNewestProtocolVersion(Database cx, WorkerDetail
wait(success(swVersionF));
const TraceEventFields& swVersionTrace = swVersionF.get();
int64_t newestProtocolVersionValue = atoi(swVersionTrace.getValue("NewestServerVersion").c_str());
int64_t newestProtocolVersionValue =
std::stoull(swVersionTrace.getValue("NewestServerVersion").c_str(), nullptr, 16);
return ProtocolVersion(newestProtocolVersionValue);
} catch (Error& e) {
if (e.code() == error_code_actor_cancelled)
throw;
TraceEvent(SevWarnAlways, "SWVersionStatusFailed").error(e);
return ProtocolVersion();
}
}