Skip to content

Commit a357200

Browse files
authored
Merge pull request #173 from Point72/172-kafka-adapter-can-drop-data-when-adjust_out_of_order_time=true-is-passed
fixes #172 - bugfix for PushPullInputAdapter when adjust OOO time is …
2 parents 86f26ed + 594d89e commit a357200

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cpp/csp/engine/PushPullInputAdapter.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@ bool PushPullInputAdapter::processNextPullEvent()
6262

6363
if( consumed && m_nextPullEvent )
6464
{
65-
if( m_adjustOutOfOrderTime )
66-
m_nextPullEvent->time = std::max( m_nextPullEvent -> time, rootEngine() -> now() );
67-
6865
m_timerHandle = rootEngine() -> scheduleCallback( m_nextPullEvent->time,
6966
[this]() { return processNextPullEvent() ? nullptr : this; } );
7067
}
@@ -83,6 +80,10 @@ PushPullInputAdapter::PullDataEvent * PushPullInputAdapter::nextPullEvent()
8380

8481
auto * event = m_poppedPullEvents.front();
8582
m_poppedPullEvents.pop();
83+
84+
if( m_adjustOutOfOrderTime )
85+
event -> time = std::max( event -> time, rootEngine() -> now() );
86+
8687
return event;
8788
}
8889

0 commit comments

Comments
 (0)