Skip to content

Commit

Permalink
fixed topic issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Gazizonoki committed Jan 21, 2025
1 parent 254fd3b commit 6a5ecae
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ydb/core/persqueue/account_read_quoter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ void TBasicAccountQuoter::ApproveQuota(NAccountQuoterEvents::TEvRequest::TPtr& e
TQuoterParams TAccountReadQuoter::GetQuoterParams(const TString& user) {
TString consumerPath = NPersQueue::ConvertOldConsumerName(user);
TQuoterParams ret;
auto userParts = SplitString(TString{consumerPath}, "/"); // account/folder/topic // account is first element
auto userParts = SplitString(consumerPath, "/"); // account/folder/topic // account is first element

const TString account = userParts[0];
userParts[0] = READ_QUOTA_ROOT_PATH; // read-quota/folder/topic
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/persqueue/mirrorer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ bool TMirrorer::AddToWriteRequest(

auto write = request.AddCmdWrite();
write->SetData(GetSerializedData(message));
TString producerId = TString{message.GetProducerId()};
TString producerId{message.GetProducerId()};
for (const auto& item : message.GetMeta()->Fields) {
if (item.first == "_encoded_producer_id") {
producerId = Base64Decode(item.second);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ TVector<TString> TFixture::ReadFromTopic(const TString& topicPath,
if (auto* e = std::get_if<NTopic::TReadSessionEvent::TDataReceivedEvent>(&event)) {
Cerr << e->HasCompressedMessages() << " " << e->GetMessagesCount() << Endl;
for (auto& m : e->GetMessages()) {
messages.push_back(TString{m.GetData()});
messages.emplace_back(m.GetData());
}

if (!tx) {
Expand Down
2 changes: 1 addition & 1 deletion ydb/services/persqueue_v1/persqueue_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4105,7 +4105,7 @@ Y_UNIT_TEST_SUITE(TPersQueueTest) {
{
NYdb::NPersQueue::TReadSessionSettings settings;
settings.ConsumerName(originallyProvidedConsumerName)
.AppendTopics(std::string("account/topic1")).ReadOriginal({"dc1"})
.AppendTopics("account/topic1").ReadOriginal({"dc1"})
.Header({{NYdb::YDB_APPLICATION_NAME, userAgent}});

auto reader = CreateReader(*driver, settings);
Expand Down
2 changes: 1 addition & 1 deletion ydb/services/persqueue_v1/ut/demo_tx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ auto TTxFixture::CreateTopicReadSession(const TString& topic,
const TString& consumer) -> TTopicReadSessionPtr
{
NYdb::NPersQueue::TReadSessionSettings settings;
settings.AppendTopics(std::string{topic});
settings.AppendTopics(topic);
settings.ConsumerName(consumer);
settings.ReadOriginal({DC});

Expand Down

0 comments on commit 6a5ecae

Please sign in to comment.