Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 0 additions & 3 deletions ydb/core/fq/libs/row_dispatcher/topic_session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,6 @@ void TTopicSession::Handle(NFq::TEvPrivate::TEvSendStatisticToReadActor::TPtr&)
if (!info.NextMessageOffset) {
continue;
}
if (*info.NextMessageOffset <= info.LastSendedNextMessageOffset) {
continue;
}
auto event = std::make_unique<TEvRowDispatcher::TEvStatistics>();
event->Record.SetPartitionId(PartitionId);
event->Record.SetNextMessageOffset(*info.NextMessageOffset);
Expand Down
11 changes: 11 additions & 0 deletions ydb/core/fq/libs/row_dispatcher/ut/topic_session_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,16 @@ class TFixture : public NUnitTest::TBaseFixture {
return eventHolder->Get()->Record.MessagesSize();
}

void ExpectStatisticToReadActor(TSet<NActors::TActorId> readActorIds) {
size_t count = readActorIds.size();
for (size_t i = 0; i < count; ++i) {
auto eventHolder = Runtime.GrabEdgeEvent<TEvRowDispatcher::TEvStatistics>(RowDispatcherActorId, TDuration::Seconds(GrabTimeoutSec));
UNIT_ASSERT(eventHolder.Get() != nullptr);
UNIT_ASSERT(readActorIds.contains(eventHolder->Get()->ReadActorId));
readActorIds.erase(eventHolder->Get()->ReadActorId);
}
}

IPureCalcProgramFactory::TPtr PureCalcProgramFactory;
NActors::TTestActorRuntime Runtime;
TActorSystemStub ActorSystemStub;
Expand Down Expand Up @@ -194,6 +204,7 @@ Y_UNIT_TEST_SUITE(TopicSessionTests) {
ExpectNewDataArrived({ReadActorId1, ReadActorId2});
ExpectMessageBatch(ReadActorId1, { Json1 });
ExpectMessageBatch(ReadActorId2, { Json1 });
ExpectStatisticToReadActor({ReadActorId1, ReadActorId2});

auto source2 = BuildSource(topicName, false, "OtherConsumer");
StartSession(ReadActorId3, source2);
Expand Down
Loading