aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorabcdef <akotov@ydb.tech>2023-09-28 17:38:58 +0300
committerabcdef <akotov@ydb.tech>2023-09-28 18:24:47 +0300
commit8f6c5ce77f7b9985601cc2001b0ff57f115e425b (patch)
treee504e956f55338fac44943eb6b98e3ee9e966ba5
parente0c2bf53d562d569da2da261bf16192f270a24b1 (diff)
downloadydb-8f6c5ce77f7b9985601cc2001b0ff57f115e425b.tar.gz
canonical paths to topics
в `TopicInfo` лежат каноничные пути к топикам
-rw-r--r--ydb/core/persqueue/fetch_request_actor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/ydb/core/persqueue/fetch_request_actor.cpp b/ydb/core/persqueue/fetch_request_actor.cpp
index 416eb6f737..fe291597b7 100644
--- a/ydb/core/persqueue/fetch_request_actor.cpp
+++ b/ydb/core/persqueue/fetch_request_actor.cpp
@@ -92,7 +92,6 @@ public:
, PartTabletsRequested(0)
, RequesterId(requesterId)
{
-
ui64 deadline = TAppData::TimeProvider->Now().MilliSeconds() + Min<ui32>(Settings.MaxWaitTimeMs, 30000);
FetchRequestBytesLeft = Settings.TotalMaxBytes;
for (const auto& p : Settings.Partitions) {
@@ -103,7 +102,8 @@ public:
Response = CreateErrorReply(Ydb::StatusIds::BAD_REQUEST, "No maxBytes for partition in fetch request");
return;
}
- bool res = TopicInfo[p.Topic].PartitionsToRequest.insert(p.Partition).second;
+ auto path = CanonizePath(p.Topic);
+ bool res = TopicInfo[path].PartitionsToRequest.insert(p.Partition).second;
if (!res) {
Response = CreateErrorReply(Ydb::StatusIds::BAD_REQUEST, "Some partition specified multiple times in fetch request");
return;
@@ -112,7 +112,7 @@ public:
fetchInfo->Record.SetPartition(p.Partition);
fetchInfo->Record.SetOffset(p.Offset);
fetchInfo->Record.SetDeadline(deadline);
- TopicInfo[p.Topic].FetchInfo[p.Partition] = fetchInfo;
+ TopicInfo[path].FetchInfo[p.Partition] = fetchInfo;
}
}
//savnik хендлить таймаут запроса
@@ -361,7 +361,7 @@ public:
const auto& part = req.Partition;
const auto& maxBytes = req.MaxBytes;
const auto& readTimestampMs = req.ReadTimestampMs;
- auto it = TopicInfo.find(topic);
+ auto it = TopicInfo.find(CanonizePath(topic));
Y_VERIFY(it != TopicInfo.end());
if (it->second.PartitionToTablet.find(part) == it->second.PartitionToTablet.end()) {
return;