Skip to content

Commit

Permalink
Show exclusive nodes in embedded ui KIKIMR-20675
Browse files Browse the repository at this point in the history
  • Loading branch information
pixcc committed Jan 22, 2024
1 parent e89c288 commit e3e5ca6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ydb/core/viewer/json_compute.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,11 @@ class TJsonCompute : public TViewerPipeClient<TJsonCompute> {
for (const NKikimrHive::THiveNodeStats& nodeStat : nodeStats) {
auto nodeId = nodeStat.GetNodeId();
if (IsRequiredNode(nodeId)) {
const auto& nodeDomain = nodeStat.GetNodeDomain();
TPathId subDomainKey(nodeDomain.GetSchemeShard(), nodeDomain.GetPathId());
if (FilterSubDomain && FilterSubDomain != subDomainKey) {
continue;
}
NodeIds.emplace_back(nodeId); // order is important
TActorId whiteboardServiceId = MakeNodeWhiteboardServiceId(nodeId);
THolder<NNodeWhiteboard::TEvWhiteboard::TEvSystemStateRequest> request = MakeHolder<NNodeWhiteboard::TEvWhiteboard::TEvSystemStateRequest>();
Expand Down
8 changes: 5 additions & 3 deletions ydb/core/viewer/json_tenantinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -667,9 +667,11 @@ class TJsonTenantInfo : public TViewerPipeClient<TJsonTenantInfo> {

if (tenant.GetType() == NKikimrViewer::Serverless) {
tenant.SetStorageAllocatedSize(tenant.GetMetrics().GetStorage());
tenant.SetMemoryUsed(tenant.GetMetrics().GetMemory());
tenant.ClearMemoryLimit();
tenant.SetCoresUsed(static_cast<double>(tenant.GetMetrics().GetCPU()) / 1000000);
if (tenant.NodeIdsSize() == 0) {
tenant.SetMemoryUsed(tenant.GetMetrics().GetMemory());
tenant.ClearMemoryLimit();
tenant.SetCoresUsed(static_cast<double>(tenant.GetMetrics().GetCPU()) / 1000000);
}
}

if (Tablets) {
Expand Down

0 comments on commit e3e5ca6

Please sign in to comment.