Skip to content

Commit

Permalink
Fix empty topic verify
Browse files Browse the repository at this point in the history
  • Loading branch information
niksaveliev committed Apr 17, 2024
1 parent bf444b8 commit 357c275
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ydb/core/client/server/msgbus_server_persqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ TProcessingResult ProcessMetaCacheSingleTopicsResponse(
MSTATUS_ERROR,
NPersQueue::NErrorCode::UNKNOWN_TOPIC,
Sprintf("path '%s' has unknown/invalid root prefix '%s', Marker# PQ14",
fullPath.c_str(), entry.Path[0].c_str()),
fullPath.c_str(), entry.Path.empty() ? "" :entry.Path[0].c_str()),
true
};
}
Expand Down
5 changes: 3 additions & 2 deletions ydb/core/client/server/msgbus_server_pq_metacache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,9 +511,10 @@ class TPersQueueMetaCacheActor : public TActorBootstrapped<TPersQueueMetaCacheAc

for (const auto& [path, database] : waiter->GetTopics()) {
auto split = NKikimr::SplitPath(path);
Y_ABORT_UNLESS(!split.empty());
TSchemeCacheNavigate::TEntry entry;
entry.Path.insert(entry.Path.end(), split.begin(), split.end());
if (!split.empty()) {
entry.Path.insert(entry.Path.end(), split.begin(), split.end());
}

entry.SyncVersion = waiter->SyncVersion;
entry.ShowPrivatePath = waiter->ShowPrivate;
Expand Down
2 changes: 1 addition & 1 deletion ydb/services/persqueue_v1/actors/persqueue_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ TProcessingResult ProcessMetaCacheTopicResponse(const TSchemeCacheNavigate::TEnt
return TProcessingResult {
Ydb::PersQueue::ErrorCode::ErrorCode::BAD_REQUEST,
Sprintf("path '%s' has unknown/invalid root prefix '%s', Marker# PQ14",
fullPath.c_str(), entry.Path[0].c_str()),
fullPath.c_str(), entry.Path.empty() ? "" : entry.Path[0].c_str()),
true
};
}
Expand Down

0 comments on commit 357c275

Please sign in to comment.