Skip to content

Commit 4f30ca5

Browse files
Merge 72bcc1e into 805196e
2 parents 805196e + 72bcc1e commit 4f30ca5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ydb/core/viewer/json_tenantinfo.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,10 +628,16 @@ class TJsonTenantInfo : public TViewerPipeClient<TJsonTenantInfo> {
628628
tenant.SetStorageAllocatedLimit(storageAllocatedLimit);
629629
tenant.SetStorageMinAvailableSize(storageMinAvailableSize);
630630
tenant.SetStorageGroups(storageGroups);
631+
631632
auto& ssdUsage = *tenant.AddStorageUsage();
632633
ssdUsage.SetType(NKikimrViewer::TStorageUsage::SSD);
633-
ssdUsage.SetSize(storageAllocatedSize);
634-
ssdUsage.SetLimit(storageAllocatedLimit);
634+
if (tenant.databasequotas().data_size_hard_quota() && tenant.GetMetrics().GetStorage()) {
635+
ssdUsage.SetSize(tenant.GetMetrics().GetStorage());
636+
ssdUsage.SetLimit(tenant.databasequotas().data_size_hard_quota());
637+
} else {
638+
ssdUsage.SetSize(storageAllocatedSize);
639+
ssdUsage.SetLimit(storageAllocatedLimit);
640+
}
635641
// TODO(andrew-rykov)
636642
auto& hddUsage = *tenant.AddStorageUsage();
637643
hddUsage.SetType(NKikimrViewer::TStorageUsage::HDD);

0 commit comments

Comments
 (0)