Skip to content

Commit c934c0a

Browse files
authored
fix storage info for stable-24-2 (#6920)
1 parent db03207 commit c934c0a

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

ydb/core/viewer/json_tenantinfo.h

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -616,11 +616,18 @@ class TJsonTenantInfo : public TViewerPipeClient<TJsonTenantInfo> {
616616
tenant.SetStorageGroups(storageGroups);
617617
auto& ssdUsage = *tenant.AddStorageUsage();
618618
ssdUsage.SetType(NKikimrViewer::TStorageUsage::SSD);
619-
ssdUsage.SetSize(storageAllocatedSize);
620-
ssdUsage.SetLimit(storageAllocatedLimit);
621-
// TODO(andrew-rykov)
622-
auto& hddUsage = *tenant.AddStorageUsage();
623-
hddUsage.SetType(NKikimrViewer::TStorageUsage::HDD);
619+
if (entry.DomainDescription
620+
&& entry.DomainDescription->Description.HasDatabaseQuotas()
621+
&& entry.DomainDescription->Description.HasDiskSpaceUsage()) {
622+
ssdUsage.SetSize(entry.DomainDescription->Description.GetDiskSpaceUsage().GetTables().GetTotalSize());
623+
ssdUsage.SetLimit(entry.DomainDescription->Description.GetDatabaseQuotas().data_size_hard_quota());
624+
} else {
625+
ssdUsage.SetSize(storageAllocatedSize);
626+
ssdUsage.SetLimit(storageAllocatedLimit);
627+
}
628+
//// TODO(andrew-rykov)
629+
//auto& hddUsage = *tenant.AddStorageUsage();
630+
//hddUsage.SetType(NKikimrViewer::TStorageUsage::HDD);
624631
}
625632
}
626633

0 commit comments

Comments
 (0)