Skip to content

Commit a20b58f

Browse files
commit
1 parent 31bd961 commit a20b58f

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

ydb/core/tx/datashard/export_common.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,14 @@ TMaybe<Ydb::Scheme::ModifyPermissionsRequest> GenYdbPermissions(const NKikimrSch
9090
return permissions;
9191
}
9292

93+
Ydb::Topic::DescribeTopicResult GenYdbTopic(const NKikimrSchemeOp::TPersQueueGroupDescription& persQueue) {
94+
95+
Ydb::Topic::DescribeTopicResult topic;
96+
97+
//topic.mutable_retention_period() = persQueue.get_
98+
99+
return topic;
100+
}
101+
93102
} // NDataShard
94103
} // NKikimr

ydb/core/tx/schemeshard/schemeshard_export_flow_proposals.cpp

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -138,26 +138,20 @@ THolder<TEvSchemeShard::TEvModifySchemeTransaction> BackupPropose(
138138
FillSetValForSequences(
139139
ss, *sourceDescription.MutableTable(), exportItemPath.Base()->PathId);
140140
}
141-
auto forFiltered = [](const auto& list, NKikimrSchemeOp::EPathType type, auto func){
142-
for (const auto& x : list) {
143-
if (x.GetPathType() == type) {
144-
func(x);
141+
auto cdcDesc = sourceDescription.GetTable().GetCdcStreams();
142+
for (const auto& x : cdcDesc) {
143+
TPathId pathId = {sourceDescription.GetTable().GetPathId().GetOwnerId(), x.GetPathId().GetLocalId()};
144+
auto cdcPathDesc = GetDescription(ss, pathId);
145+
for (const auto& child : cdcPathDesc.GetChildren()) {
146+
if (child.GetPathType() == NKikimrSchemeOp::EPathTypePersQueueGroup) {
147+
TPathId pathId = {child.GetParentPathId(), child.GetPathId()};
148+
::NKikimrSchemeOp::TPathDescription* newPersQueue = task.MutablePersQueue()->Add();
149+
*newPersQueue = GetDescription(ss, pathId);
145150
}
146151
}
147-
};
148-
forFiltered(sourceDescription.GetChildren(), NKikimrSchemeOp::EPathTypeCdcStream,
149-
[&ss, &forFiltered, &task](auto x){
150-
TPathId pathId = {x.GetSchemeshardId(), x.GetPathId()};
151-
auto desc = GetDescription(ss, pathId);
152-
forFiltered(desc.GetChildren(), NKikimrSchemeOp::EPathTypePersQueueGroup,
153-
[&ss, &task](auto y){
154-
TPathId pathId = {y.GetSchemeshardId(), y.GetPathId()};
155-
::NKikimrSchemeOp::TPathDescription* newPersQueue = task.MutablePersQueue()->Add();
156-
*newPersQueue = GetDescription(ss, pathId);
157-
}
158-
);
159-
}
160-
);
152+
}
153+
154+
Cerr << "tsz: " << task.GetPersQueue().size() << Endl;
161155
task.MutableTable()->CopyFrom(sourceDescription);
162156
}
163157

0 commit comments

Comments
 (0)