diff options
author | andrew-rykov <arykov@ydb.tech> | 2023-08-14 12:36:52 +0300 |
---|---|---|
committer | andrew-rykov <arykov@ydb.tech> | 2023-08-14 13:50:32 +0300 |
commit | 30d989f97b9f0b7404b394e698fc515adab34afc (patch) | |
tree | 2f772364beb2ba43b948557bdd6a943f12d928fd | |
parent | 4da28f7f97b6c1ae300df33b4e515e64b07a0323 (diff) | |
download | ydb-30d989f97b9f0b7404b394e698fc515adab34afc.tar.gz |
too much groups with node id filter
-rw-r--r-- | ydb/core/viewer/json_storage.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ydb/core/viewer/json_storage.h b/ydb/core/viewer/json_storage.h index 3620e06a3f8..9eb70c26705 100644 --- a/ydb/core/viewer/json_storage.h +++ b/ydb/core/viewer/json_storage.h @@ -72,6 +72,7 @@ class TJsonStorage : public TViewerPipeClient<TJsonStorage> { TVector<TString> FilterGroupIds; TString Filter; std::unordered_set<TNodeId> FilterNodeIds; + THashSet<TString> EffectiveFilterGroupIds; std::unordered_set<TNodeId> NodeIds; bool NeedGroups = true; bool NeedDisks = true; @@ -417,6 +418,10 @@ public: } if (FilterNodeIds.empty() || FilterNodeIds.contains(nodeId)) { StoragePoolInfo[storagePoolName].Groups.emplace(ToString(info.GetGroupID())); + TString groupId(ToString(info.GetGroupID())); + if (FilterGroupIds.empty() || BinarySearch(FilterGroupIds.begin(), FilterGroupIds.end(), groupId)) { + EffectiveFilterGroupIds.insert(groupId); + } } for (const auto& vDiskNodeId : info.GetVDiskNodeIds()) { Group2NodeId[info.GetGroupID()].push_back(vDiskNodeId); @@ -574,7 +579,7 @@ public: } bool CheckGroupFilters(const TString& groupId, const TString& poolName) { - if (!FilterGroupIds.empty() && !BinarySearch(FilterGroupIds.begin(), FilterGroupIds.end(), groupId)) { + if (!EffectiveFilterGroupIds.empty() && !EffectiveFilterGroupIds.contains(groupId)) { return false; } switch (With) { |