mirror of
https://github.com/apple/foundationdb.git
synced 2025-06-01 10:45:56 +08:00
fix storage_metadata disappear because other attribution is missed
This commit is contained in:
parent
64b7e92002
commit
bcf022575c
@ -487,6 +487,11 @@ struct RolesInfo {
|
|||||||
double dataLagSeconds = -1.0;
|
double dataLagSeconds = -1.0;
|
||||||
obj["id"] = iface.id().shortString();
|
obj["id"] = iface.id().shortString();
|
||||||
obj["role"] = role;
|
obj["role"] = role;
|
||||||
|
if (iface.metadata.present()) {
|
||||||
|
obj["storage_metadata"] = iface.metadata.get().toJSON();
|
||||||
|
// printf("%s\n", metadataObj.getJson().c_str());
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
TraceEventFields const& storageMetrics = metrics.at("StorageMetrics");
|
TraceEventFields const& storageMetrics = metrics.at("StorageMetrics");
|
||||||
|
|
||||||
@ -594,14 +599,12 @@ struct RolesInfo {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (iface.metadata.present()) {
|
|
||||||
obj["storage_metadata"] = iface.metadata.get().toJSON();
|
|
||||||
// printf("%s\n", metadataObj.getJson().c_str());
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch (Error& e) {
|
} catch (Error& e) {
|
||||||
if (e.code() != error_code_attribute_not_found)
|
if (e.code() != error_code_attribute_not_found)
|
||||||
throw e;
|
throw e;
|
||||||
|
else {
|
||||||
|
TraceEvent(SevWarnAlways, "StorageServerStatusJson").error(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pDataLagSeconds) {
|
if (pDataLagSeconds) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user