When tabulating read workload metrics, ignore the absence of any particular storage server.

This commit is contained in:
A.J. Beamon 2019-03-22 14:22:22 -07:00
parent f3a85f62c1
commit fc48b6050e
2 changed files with 7 additions and 4 deletions

View File

@ -39,6 +39,7 @@ Fixes
* Python: Creating a ``SingleFloat`` for the tuple layer didn't work with integers. `(PR #1216) <https://github.com/apple/foundationdb/pull/1216>`_ * Python: Creating a ``SingleFloat`` for the tuple layer didn't work with integers. `(PR #1216) <https://github.com/apple/foundationdb/pull/1216>`_
* In some cases, calling ``OnError`` with a non-retryable error would partially reset a transaction. As of API version 610, the transaction will no longer be reset in these cases and will instead put the transaction into an error state. `(PR #1298) <https://github.com/apple/foundationdb/pull/1298>`_ * In some cases, calling ``OnError`` with a non-retryable error would partially reset a transaction. As of API version 610, the transaction will no longer be reset in these cases and will instead put the transaction into an error state. `(PR #1298) <https://github.com/apple/foundationdb/pull/1298>`_
* Standardized datetime string format across all backup and restore command options and outputs. `(PR #1248) <https://github.com/apple/foundationdb/pull/1248>`_ * Standardized datetime string format across all backup and restore command options and outputs. `(PR #1248) <https://github.com/apple/foundationdb/pull/1248>`_
* Read workload status metrics would disappear when a storage server was missing. `(PR #) <https://github.com/apple/foundationdb/pull/>`_
Status Status
------ ------

View File

@ -1505,10 +1505,12 @@ ACTOR static Future<JsonBuilderObject> workloadStatusFetcher(Reference<AsyncVar<
for(auto &ss : storageServers.get()) { for(auto &ss : storageServers.get()) {
TraceEventFields const& storageMetrics = ss.second.at("StorageMetrics"); TraceEventFields const& storageMetrics = ss.second.at("StorageMetrics");
readRequests.updateValues( StatusCounter(storageMetrics.getValue("QueryQueue"))); if (storageMetrics.size() > 0) {
reads.updateValues( StatusCounter(storageMetrics.getValue("FinishedQueries"))); readRequests.updateValues(StatusCounter(storageMetrics.getValue("QueryQueue")));
readKeys.updateValues( StatusCounter(storageMetrics.getValue("RowsQueried"))); reads.updateValues(StatusCounter(storageMetrics.getValue("FinishedQueries")));
readBytes.updateValues( StatusCounter(storageMetrics.getValue("BytesQueried"))); readKeys.updateValues(StatusCounter(storageMetrics.getValue("RowsQueried")));
readBytes.updateValues(StatusCounter(storageMetrics.getValue("BytesQueried")));
}
} }
operationsObj["read_requests"] = readRequests.getStatus(); operationsObj["read_requests"] = readRequests.getStatus();