Skip to content

Commit e05d4be

Browse files
swalrus1Gazizonoki
authored andcommitted
Moved commit "configure tiering on CS via ttl" from ydb repo
1 parent 1e4094b commit e05d4be

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

include/ydb-cpp-sdk/client/table/table.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,7 @@ class TTableDescription {
665665
std::vector<TIndexDescription> GetIndexDescriptions() const;
666666
std::vector<TChangefeedDescription> GetChangefeedDescriptions() const;
667667
std::optional<TTtlSettings> GetTtlSettings() const;
668+
// Deprecated. Use GetTtlSettings() instead
668669
std::optional<std::string> GetTiering() const;
669670
EStoreType GetStoreType() const;
670671

src/client/table/table.cpp

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,6 @@ class TTableDescription::TImpl {
331331
TtlSettings_ = std::move(*ttlSettings);
332332
}
333333

334-
// tiering
335-
if (proto.tiering().size()) {
336-
Tiering_ = proto.tiering();
337-
}
338-
339334
if (proto.store_type()) {
340335
StoreType_ = (proto.store_type() == Ydb::Table::STORE_TYPE_COLUMN) ? EStoreType::Column : EStoreType::Row;
341336
}
@@ -407,9 +402,7 @@ class TTableDescription::TImpl {
407402
}
408403

409404
for (const auto& shardStats : Proto_.table_stats().partition_stats()) {
410-
PartitionStats_.emplace_back(
411-
TPartitionStats{shardStats.rows_estimate(), shardStats.store_size(), shardStats.leader_node_id()}
412-
);
405+
PartitionStats_.emplace_back(TPartitionStats{ shardStats.rows_estimate(), shardStats.store_size(), shardStats.leader_node_id() });
413406
}
414407

415408
TableStats.Rows = Proto_.table_stats().rows_estimate();
@@ -566,10 +559,6 @@ class TTableDescription::TImpl {
566559
return TtlSettings_;
567560
}
568561

569-
const std::optional<std::string>& GetTiering() const {
570-
return Tiering_;
571-
}
572-
573562
EStoreType GetStoreType() const {
574563
return StoreType_;
575564
}
@@ -650,7 +639,6 @@ class TTableDescription::TImpl {
650639
std::vector<TIndexDescription> Indexes_;
651640
std::vector<TChangefeedDescription> Changefeeds_;
652641
std::optional<TTtlSettings> TtlSettings_;
653-
std::optional<std::string> Tiering_;
654642
std::string Owner_;
655643
std::vector<NScheme::TPermissions> Permissions_;
656644
std::vector<NScheme::TPermissions> EffectivePermissions_;
@@ -718,7 +706,7 @@ std::optional<TTtlSettings> TTableDescription::GetTtlSettings() const {
718706
}
719707

720708
std::optional<std::string> TTableDescription::GetTiering() const {
721-
return Impl_->GetTiering();
709+
return std::nullopt;
722710
}
723711

724712
EStoreType TTableDescription::GetStoreType() const {
@@ -941,10 +929,6 @@ void TTableDescription::SerializeTo(Ydb::Table::CreateTableRequest& request) con
941929
ttl->SerializeTo(*request.mutable_ttl_settings());
942930
}
943931

944-
if (const auto& tiering = Impl_->GetTiering()) {
945-
request.set_tiering(TStringType{tiering.value()});
946-
}
947-
948932
if (Impl_->GetStoreType() == EStoreType::Column) {
949933
request.set_store_type(Ydb::Table::StoreType::STORE_TYPE_COLUMN);
950934
}

0 commit comments

Comments
 (0)