From 393611318c703470629f0c3469f9cddb86c6ecd1 Mon Sep 17 00:00:00 2001 From: Grigoriy Pisarenko Date: Tue, 10 Dec 2024 12:51:28 +0000 Subject: [PATCH] Fixed typo --- .../format_handler/format_handler.cpp | 32 +++++++++---------- .../format_handler/format_handler.h | 2 +- .../format_handler/ut/format_handler_ut.cpp | 2 +- .../fq/libs/row_dispatcher/topic_session.cpp | 4 +-- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ydb/core/fq/libs/row_dispatcher/format_handler/format_handler.cpp b/ydb/core/fq/libs/row_dispatcher/format_handler/format_handler.cpp index e9bc790f9beb..1a8bdedf4bf1 100644 --- a/ydb/core/fq/libs/row_dispatcher/format_handler/format_handler.cpp +++ b/ydb/core/fq/libs/row_dispatcher/format_handler/format_handler.cpp @@ -94,8 +94,8 @@ class TTopicFormatHandler : public NActors::TActor, public } for (const auto clientId : columnIt->second.Clients) { - const auto clientIt = Self.Clinets.find(clientId); - if (clientIt != Self.Clinets.end()) { + const auto clientIt = Self.Clients.find(clientId); + if (clientIt != Self.Clients.end()) { clientIt->second->OnClientError(status); } } @@ -298,7 +298,7 @@ class TTopicFormatHandler : public NActors::TActor, public Counters.ActiveClients->Set(0); with_lock(Alloc) { - Clinets.clear(); + Clients.clear(); } } @@ -327,7 +327,7 @@ class TTopicFormatHandler : public NActors::TActor, public void Handle(NActors::TEvents::TEvPoison::TPtr&) { with_lock(Alloc) { - Clinets.clear(); + Clients.clear(); } PassAway(); } @@ -344,14 +344,14 @@ class TTopicFormatHandler : public NActors::TActor, public if (Parser) { Parser->ParseMessages(messages); ScheduleRefresh(); - } else if (!Clinets.empty()) { + } else if (!Clients.empty()) { FatalError(TStatus::Fail(EStatusId::INTERNAL_ERROR, "Failed to parse messages, expected empty clients set without parser")); } } TQueue>> ExtractClientData(NActors::TActorId clientId) override { - const auto it = Clinets.find(clientId); - if (it == Clinets.end()) { + const auto it = Clients.find(clientId); + if (it == Clients.end()) { return {}; } return it->second->ExtractClientData(); @@ -361,7 +361,7 @@ class TTopicFormatHandler : public NActors::TActor, public LOG_ROW_DISPATCHER_DEBUG("Add client with id " << client->GetClientId()); auto clientHandler = MakeIntrusive(*this, client); - if (!Clinets.emplace(client->GetClientId(), clientHandler).second) { + if (!Clients.emplace(client->GetClientId(), clientHandler).second) { return TStatus::Fail(EStatusId::INTERNAL_ERROR, TStringBuilder() << "Failed to create new client, client with id " << client->GetClientId() << " already exists"); } Counters.ActiveClients->Inc(); @@ -392,14 +392,14 @@ class TTopicFormatHandler : public NActors::TActor, public Filters->RemoveFilter(clientId); } - const auto it = Clinets.find(clientId); - if (it == Clinets.end()) { + const auto it = Clients.find(clientId); + if (it == Clients.end()) { return; } const auto client = it->second->GetClient(); Counters.ActiveClients->Dec(); - Clinets.erase(it); + Clients.erase(it); for (const auto& column : client->GetColumns()) { const auto columnIt = ColumnsDesc.find(column.Name); @@ -420,7 +420,7 @@ class TTopicFormatHandler : public NActors::TActor, public } bool HasClients() const override { - return !Clinets.empty(); + return !Clients.empty(); } TFormatHandlerStatistic GetStatistics() override { @@ -514,17 +514,17 @@ class TTopicFormatHandler : public NActors::TActor, public Filters->FilterData(ParserSchemaIndex, *Offsets, ParsedData, numberRows); } - for (const auto& [_, client] : Clinets) { + for (const auto& [_, client] : Clients) { if (client->IsClientStarted()) { LOG_ROW_DISPATCHER_TRACE("Commit client " << client->GetClient()->GetClientId() << " offset " << lastOffset); - client->GetClient()->UpdateClinetOffset(lastOffset); + client->GetClient()->UpdateClientOffset(lastOffset); } } } void FatalError(TStatus status) const { LOG_ROW_DISPATCHER_ERROR("Got fatal error: " << status.GetErrorMessage()); - for (const auto& [_, client] : Clinets) { + for (const auto& [_, client] : Clients) { client->OnClientError(status); } } @@ -539,7 +539,7 @@ class TTopicFormatHandler : public NActors::TActor, public TVector FreeColumnIds; TVector ParserSchemaIndex; // Column id to index in parser schema std::map ColumnsDesc; - std::unordered_map Clinets; + std::unordered_map Clients; // Perser and filters ITopicParser::TPtr Parser; diff --git a/ydb/core/fq/libs/row_dispatcher/format_handler/format_handler.h b/ydb/core/fq/libs/row_dispatcher/format_handler/format_handler.h index ec5bcf762b74..809d59b42e07 100644 --- a/ydb/core/fq/libs/row_dispatcher/format_handler/format_handler.h +++ b/ydb/core/fq/libs/row_dispatcher/format_handler/format_handler.h @@ -25,7 +25,7 @@ class IClientDataConsumer : public TThrRefBase { virtual void StartClientSession() = 0; virtual void AddDataToClient(ui64 offset, ui64 rowSize) = 0; - virtual void UpdateClinetOffset(ui64 offset) = 0; + virtual void UpdateClientOffset(ui64 offset) = 0; }; class ITopicFormatHandler : public TNonCopyable { diff --git a/ydb/core/fq/libs/row_dispatcher/format_handler/ut/format_handler_ut.cpp b/ydb/core/fq/libs/row_dispatcher/format_handler/ut/format_handler_ut.cpp index 17ec09099769..c643dba27026 100644 --- a/ydb/core/fq/libs/row_dispatcher/format_handler/ut/format_handler_ut.cpp +++ b/ydb/core/fq/libs/row_dispatcher/format_handler/ut/format_handler_ut.cpp @@ -102,7 +102,7 @@ class TFormatHadlerFixture : public TBaseFixture { HasData = true; } - void UpdateClinetOffset(ui64 offset) override { + void UpdateClientOffset(ui64 offset) override { UNIT_ASSERT_C(Started, "Unexpected offset for not started session"); UNIT_ASSERT_C(!ExpectedError, "Error is not handled: " << ExpectedError->second << ", client id: " << ClientId); UNIT_ASSERT_C(!Offsets.empty(), "Unexpected message batch, offset: " << offset << ", client id: " << ClientId); diff --git a/ydb/core/fq/libs/row_dispatcher/topic_session.cpp b/ydb/core/fq/libs/row_dispatcher/topic_session.cpp index 0c029ac0cf7a..a9642647b9dc 100644 --- a/ydb/core/fq/libs/row_dispatcher/topic_session.cpp +++ b/ydb/core/fq/libs/row_dispatcher/topic_session.cpp @@ -158,8 +158,8 @@ class TTopicSession : public TActorBootstrapped { Self.SendDataArrived(*this); } - void UpdateClinetOffset(ui64 offset) override { - LOG_ROW_DISPATCHER_TRACE("UpdateClinetOffset for " << ReadActorId << ", new offset: " << offset); + void UpdateClientOffset(ui64 offset) override { + LOG_ROW_DISPATCHER_TRACE("UpdateClientOffset for " << ReadActorId << ", new offset: " << offset); if (!NextMessageOffset || *NextMessageOffset < offset + 1) { NextMessageOffset = offset + 1; }