Skip to content

YQ-3955-RD fixed field ids error #12454

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions ydb/core/fq/libs/row_dispatcher/topic_session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ class TTopicSession : public TActorBootstrapped<TTopicSession> {
ExceptionFunc(std::exception, HandleException)
)

STRICT_STFUNC(ErrorState, {
STRICT_STFUNC_EXC(ErrorState,
cFunc(NActors::TEvents::TEvPoisonPill::EventType, PassAway);
IgnoreFunc(NFq::TEvPrivate::TEvPqEventsReady);
IgnoreFunc(NFq::TEvPrivate::TEvCreateSession);
Expand All @@ -319,8 +319,9 @@ class TTopicSession : public TActorBootstrapped<TTopicSession> {
IgnoreFunc(NFq::TEvRowDispatcher::TEvStartSession);
IgnoreFunc(NFq::TEvRowDispatcher::TEvStopSession);
IgnoreFunc(NFq::TEvPrivate::TEvSendStatisticToRowDispatcher);
IgnoreFunc(TEvRowDispatcher::TEvPurecalcCompileResponse);
})
IgnoreFunc(TEvRowDispatcher::TEvPurecalcCompileResponse);,
ExceptionFunc(std::exception, HandleException)
)
};

TTopicSession::TTopicSession(
Expand Down Expand Up @@ -814,12 +815,6 @@ void TTopicSession::StartClientSession(TClientsInfo& info) {
}
}

if (Parser) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А почему этот if ушел, ничего не сломает?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DoParsing(true) как оказалось опасная штука, её надо вызывать аккуратно, оставил её только в одном месте:

if (Parser) {
// Parse remains data before adding new client
DoParsing(true);
}

Это нужно делать только перед обновлением парсера в UpdateParser(), при этом все клиенты должны быть готовы к тому, что сейчас в них польются данные со старой схемой, по этому раньше падало (данные со старой схемой шли в новых клиентов)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Теперь парсер будет обновляться сразу, как только добавился клиент, так будет проще, стабильнее и ошибки будут быстрее валидироваться

// Parse remains data before changing parsing schema
DoParsing(true);
}
UpdateParser();

if (!ReadSession) {
Schedule(TDuration::Seconds(Config.GetTimeoutBeforeStartSessionSec()), new NFq::TEvPrivate::TEvCreateSession());
}
Expand Down Expand Up @@ -848,6 +843,7 @@ void TTopicSession::Handle(NFq::TEvRowDispatcher::TEvStartSession::TPtr& ev) {
std::forward_as_tuple(ev->Sender),
std::forward_as_tuple(ev, readGroup)).first->second;
UpdateFieldsIds(clientInfo);
UpdateParser();

const auto& source = clientInfo.Settings.GetSource();
TString predicate = source.GetPredicate();
Expand Down
Loading