Skip to content

Commit c28e8f3

Browse files
authored
Fix empty topic verify (#3833)
1 parent 2ee55e2 commit c28e8f3

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

ydb/core/client/server/msgbus_server_persqueue.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ TProcessingResult ProcessMetaCacheSingleTopicsResponse(
6565
MSTATUS_ERROR,
6666
NPersQueue::NErrorCode::UNKNOWN_TOPIC,
6767
Sprintf("path '%s' has unknown/invalid root prefix '%s', Marker# PQ14",
68-
fullPath.c_str(), entry.Path[0].c_str()),
68+
fullPath.c_str(), entry.Path.empty() ? "" :entry.Path[0].c_str()),
6969
true
7070
};
7171
}

ydb/core/client/server/msgbus_server_pq_metacache.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,9 +511,10 @@ class TPersQueueMetaCacheActor : public TActorBootstrapped<TPersQueueMetaCacheAc
511511

512512
for (const auto& [path, database] : waiter->GetTopics()) {
513513
auto split = NKikimr::SplitPath(path);
514-
Y_ABORT_UNLESS(!split.empty());
515514
TSchemeCacheNavigate::TEntry entry;
516-
entry.Path.insert(entry.Path.end(), split.begin(), split.end());
515+
if (!split.empty()) {
516+
entry.Path.insert(entry.Path.end(), split.begin(), split.end());
517+
}
517518

518519
entry.SyncVersion = waiter->SyncVersion;
519520
entry.ShowPrivatePath = waiter->ShowPrivate;

ydb/services/persqueue_v1/actors/persqueue_utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ TProcessingResult ProcessMetaCacheTopicResponse(const TSchemeCacheNavigate::TEnt
3737
return TProcessingResult {
3838
Ydb::PersQueue::ErrorCode::ErrorCode::BAD_REQUEST,
3939
Sprintf("path '%s' has unknown/invalid root prefix '%s', Marker# PQ14",
40-
fullPath.c_str(), entry.Path[0].c_str()),
40+
fullPath.c_str(), entry.Path.empty() ? "" : entry.Path[0].c_str()),
4141
true
4242
};
4343
}

0 commit comments

Comments
 (0)