Skip to content

Commit 1642487

Browse files
The path to the topic in federation mode (#14768)
1 parent 9dda4cb commit 1642487

File tree

6 files changed

+9
-14
lines changed

6 files changed

+9
-14
lines changed

ydb/core/kqp/session_actor/kqp_query_state.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,7 @@ void TKqpQueryState::AddOffsetsToTransaction() {
444444
TopicOperations = NTopic::TTopicOperations();
445445

446446
for (auto& topic : operations.GetTopics()) {
447-
auto path = CanonizePath(NPersQueue::GetFullTopicPath(TlsActivationContext->AsActorContext(),
448-
GetDatabase(), topic.path()));
447+
auto path = CanonizePath(NPersQueue::GetFullTopicPath(GetDatabase(), topic.path()));
449448

450449
for (auto& partition : topic.partitions()) {
451450
if (partition.partition_offsets().empty()) {

ydb/library/persqueue/topic_parser/topic_parser.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,8 @@ TString NormalizeFullPath(const TString& fullPath) {
6767
}
6868
}
6969

70-
TString GetFullTopicPath(const NActors::TActorContext& ctx, const TMaybe<TString>& database, const TString& topicPath) {
71-
if (NKikimr::AppData(ctx)->PQConfig.GetTopicsAreFirstClassCitizen()) {
72-
return FullPath(database, topicPath);
73-
} else {
74-
return topicPath;
75-
}
70+
TString GetFullTopicPath(const TMaybe<TString>& database, const TString& topicPath) {
71+
return FullPath(database, topicPath);
7672
}
7773

7874
TString ConvertNewConsumerName(const TString& consumer, const NKikimrPQ::TPQConfig& pqConfig) {

ydb/library/persqueue/topic_parser/topic_parser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace NKikimr::NMsgBusProxy::NPqMetaCacheV2 {
1717

1818
namespace NPersQueue {
1919

20-
TString GetFullTopicPath(const NActors::TActorContext& ctx, const TMaybe<TString>& database, const TString& topicPath);
20+
TString GetFullTopicPath(const TMaybe<TString>& database, const TString& topicPath);
2121
TString ConvertNewConsumerName(const TString& consumer, const NKikimrPQ::TPQConfig& pqConfig);
2222
TString ConvertNewConsumerName(const TString& consumer, const NActors::TActorContext& ctx);
2323
TString ConvertOldConsumerName(const TString& consumer, const NKikimrPQ::TPQConfig& pqConfig);

ydb/services/lib/actors/pq_schema_actor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ namespace NKikimr::NGRpcProxy::V1 {
284284
}
285285

286286
TString GetTopicPath() const override {
287-
auto path = NPersQueue::GetFullTopicPath(this->ActorContext(), this->Request_->GetDatabaseName(), TActorBase::TopicPath);
287+
auto path = NPersQueue::GetFullTopicPath(this->Request_->GetDatabaseName(), TActorBase::TopicPath);
288288
if (PrivateTopicName) {
289289
path = JoinPath(ChildPath(NKikimr::SplitPath(path), *PrivateTopicName));
290290
}

ydb/services/persqueue_v1/actors/write_session_actor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ void TWriteSessionActor<UseMigrationProtocol>::SetupCounters()
542542
}
543543

544544
template<bool UseMigrationProtocol>
545-
void TWriteSessionActor<UseMigrationProtocol>::SetupCounters(const TActorContext& ctx, const TString& cloudId, const TString& dbId, const TString& dbPath, const bool isServerless, const TString& folderId)
545+
void TWriteSessionActor<UseMigrationProtocol>::SetupCounters(const TString& cloudId, const TString& dbId, const TString& dbPath, const bool isServerless, const TString& folderId)
546546
{
547547
if (SessionsCreated) {
548548
return;
@@ -559,7 +559,7 @@ void TWriteSessionActor<UseMigrationProtocol>::SetupCounters(const TActorContext
559559
SessionsCreated.Inc();
560560
SessionsActive.Inc();
561561

562-
SetupBytesWrittenByUserAgentCounter(NPersQueue::GetFullTopicPath(ctx, dbPath, FullConverter->GetPrimaryPath()));
562+
SetupBytesWrittenByUserAgentCounter(NPersQueue::GetFullTopicPath(dbPath, FullConverter->GetPrimaryPath()));
563563
}
564564

565565
template<bool UseMigrationProtocol>
@@ -616,7 +616,7 @@ void TWriteSessionActor<UseMigrationProtocol>::Handle(TEvDescribeTopicsResponse:
616616

617617
if (AppData(ctx)->PQConfig.GetTopicsAreFirstClassCitizen()) {
618618
const auto& tabletConfig = Config.GetPQTabletConfig();
619-
SetupCounters(ctx, tabletConfig.GetYcCloudId(), tabletConfig.GetYdbDatabaseId(),
619+
SetupCounters(tabletConfig.GetYcCloudId(), tabletConfig.GetYdbDatabaseId(),
620620
tabletConfig.GetYdbDatabasePath(), entry.DomainInfo->IsServerless(),
621621
tabletConfig.GetYcFolderId());
622622
} else {

ydb/services/persqueue_v1/actors/write_session_actor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class TWriteSessionActor
166166

167167
void SetupBytesWrittenByUserAgentCounter(const TString& topicPath);
168168
void SetupCounters();
169-
void SetupCounters(const TActorContext& ctx, const TString& cloudId, const TString& dbId, const TString& dbPath, const bool isServerless, const TString& folderId);
169+
void SetupCounters(const TString& cloudId, const TString& dbId, const TString& dbPath, const bool isServerless, const TString& folderId);
170170

171171
void CloseSpans(const TString& errorReason, const PersQueue::ErrorCode::ErrorCode errorCode);
172172

0 commit comments

Comments
 (0)