diff options
| author | kvk1920 <[email protected]> | 2023-11-23 18:28:58 +0300 |
|---|---|---|
| committer | kvk1920 <[email protected]> | 2023-11-23 19:29:10 +0300 |
| commit | 39b5747f8c9c99ab475c64922e33edd81450cf06 (patch) | |
| tree | 4a0debf0f260e8a3df0571f20eabcb27c888e925 | |
| parent | 36d5794c5f59dab0826acad3c7d3507b9e540968 (diff) | |
Sorted map in RemoveMinatnenace response
| -rw-r--r-- | yt/yt/client/api/rpc_proxy/client_impl.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/yt/yt/client/api/rpc_proxy/client_impl.cpp b/yt/yt/client/api/rpc_proxy/client_impl.cpp index 33451d29049..eb77184dc02 100644 --- a/yt/yt/client/api/rpc_proxy/client_impl.cpp +++ b/yt/yt/client/api/rpc_proxy/client_impl.cpp @@ -1862,9 +1862,8 @@ TFuture<TMaintenanceCounts> TClient::RemoveMaintenance( counts[EMaintenanceType::DisableTabletCells] = rspValue->disable_tablet_cells(); counts[EMaintenanceType::PendingRestart] = rspValue->pending_restart(); } else { - for (auto type : TEnumTraits<EMaintenanceType>::GetDomainValues()) { - auto it = protoCounts.find(ConvertMaintenanceTypeToProto(type)); - counts[type] = it == protoCounts.end() ? 0 : it->second; + for (auto [type, count] : protoCounts) { + counts[CheckedEnumCast<EMaintenanceType>(type)] = count; } } |
