Skip to content

Commit 29d5c2c

Browse files
committed
Review fixes
- fix style - add descriptive comment about the nature of the storage pool kind mapping
1 parent 5d0f291 commit 29d5c2c

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

ydb/core/tx/schemeshard/schemeshard__operation_common_subdomain.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
namespace NKikimr {
77
namespace NSchemeShard {
88

9-
inline bool CheckStoragePoolsInQuotas(const Ydb::Cms::DatabaseQuotas& quotas,
10-
const TVector<TStoragePool>& pools,
11-
const TString& path,
12-
TString& error
9+
inline bool CheckStoragePoolsInQuotas(
10+
const Ydb::Cms::DatabaseQuotas& quotas,
11+
const TVector<TStoragePool>& pools,
12+
const TString& path,
13+
TString& error
1314
) {
1415
TVector<TString> quotedKinds;
1516
quotedKinds.reserve(quotas.storage_quotas_size());

ydb/core/tx/schemeshard/schemeshard_info_types.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ EDiskUsageStatus CheckStoragePoolsQuotas(const THashMap<TString, TStoragePoolUsa
5151
: EDiskUsageStatus::BelowSoftQuota;
5252
}
5353

54+
/*
55+
This is a workaround!
56+
It makes sense only in the specific case where:
57+
- there are no multiple storage pools of the same kind
58+
- all storage pool kinds belong to the set {ssh*, hdd*, rot*, nvme*}
59+
*/
5460
EUserFacingStorageType GetUserFacingStorageType(const TString& poolKind) {
5561
if (poolKind.StartsWith("ssd") || poolKind.StartsWith("nvme")) {
5662
return EUserFacingStorageType::Ssd;

0 commit comments

Comments
 (0)