aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkomels <komels@ydb.tech>2022-10-28 08:57:19 +0300
committerkomels <komels@ydb.tech>2022-10-28 08:57:19 +0300
commit635cbec3c0a8f04717167196ca5412e14db8af78 (patch)
tree929572fff9638c9381e88de3f55cbd16541a7273
parent256ab6ae39c45fc4b2795302025d4424e4f582d0 (diff)
downloadydb-635cbec3c0a8f04717167196ca5412e14db8af78.tar.gz
Bugfix for topic parser
-rw-r--r--ydb/library/persqueue/topic_parser/topic_parser.cpp2
-rw-r--r--ydb/library/persqueue/topic_parser/ut/topic_names_converter_ut.cpp6
2 files changed, 6 insertions, 2 deletions
diff --git a/ydb/library/persqueue/topic_parser/topic_parser.cpp b/ydb/library/persqueue/topic_parser/topic_parser.cpp
index 88c94dcc760..c1377d4d4f8 100644
--- a/ydb/library/persqueue/topic_parser/topic_parser.cpp
+++ b/ydb/library/persqueue/topic_parser/topic_parser.cpp
@@ -206,8 +206,6 @@ void TDiscoveryConverter::BuildForFederation(const TStringBuf& databaseBuf, TStr
isRootDb = true;
root = PQPrefix;
SkipPathPrefix(topicPath, PQPrefix);
- } else {
- SkipPathPrefix(topicPath, databaseBuf);
}
} else if (IsPathPrefix(topicPath, PQPrefix)) {
isRootDb = true;
diff --git a/ydb/library/persqueue/topic_parser/ut/topic_names_converter_ut.cpp b/ydb/library/persqueue/topic_parser/ut/topic_names_converter_ut.cpp
index 118c81063b1..240f3da2c63 100644
--- a/ydb/library/persqueue/topic_parser/ut/topic_names_converter_ut.cpp
+++ b/ydb/library/persqueue/topic_parser/ut/topic_names_converter_ut.cpp
@@ -167,6 +167,12 @@ Y_UNIT_TEST_SUITE(DiscoveryConverterTest) {
);
UNIT_ASSERT_VALUES_EQUAL(converter->GetFullModernName(), "account-topic");
+ converter = converterFactory.MakeDiscoveryConverter(
+ "account/account/account", {}, "dc1", "account"
+ );
+ UNIT_ASSERT_VALUES_EQUAL(converter->GetFullModernName(), "account/account");
+ UNIT_ASSERT_VALUES_EQUAL(converter->GetSecondaryPath("account"), "/account/account/account");
+
}
Y_UNIT_TEST(FirstClass) {