Skip to content

Commit 8b15591

Browse files
qyryqGazizonoki
authored andcommitted
Moved commit "ydb_topic: Call non-dataEvent callbacks immediately" from ydb repo
1 parent dc233ce commit 8b15591

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/client/topic/impl/read_session_impl.ipp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1948,7 +1948,7 @@ void TSingleClusterReadSessionImpl<UseMigrationProtocol>::TrySubscribeOnTransact
19481948

19491949
auto callback = [cbContext = this->SelfContext, txId, txInfo, consumer = Settings.ConsumerName_, client]() {
19501950
std::vector<TTopicOffsets> offsets;
1951-
1951+
19521952
with_lock (txInfo->Lock) {
19531953
Y_ABORT_UNLESS(!txInfo->CommitCalled);
19541954

@@ -2083,6 +2083,13 @@ bool TReadSessionEventsQueue<UseMigrationProtocol>::PushEvent(TIntrusivePtr<TPar
20832083
stream->DeleteNotReadyTail(deferred);
20842084
}
20852085

2086+
if (!HasDataEventCallback() && !std::holds_alternative<TADataReceivedEvent<UseMigrationProtocol>>(event)) {
2087+
// Call non-dataEvent callbacks immediately.
2088+
if (TryApplyCallbackToEventImpl(event, deferred, CbContext)) {
2089+
return true;
2090+
}
2091+
}
2092+
20862093
stream->InsertEvent(std::move(event));
20872094
Y_ASSERT(stream->HasEvents());
20882095

0 commit comments

Comments
 (0)