Search before reporting
Read release policy
User environment
Pulsar Functions, Java window function WindowFunctionExecutor.
Issue Description
What happened:
When an event-time window function receives a message whose extracted timestamp is behind the current watermark, WindowFunctionExecutor.process() treats it as a late tuple and keeps it out of the window. With lateDataTopic unset it logs Received a late tuple. This will not be processed. With lateDataTopic set it republishes the value there through sendAsync(). Neither path acks the record.
Under ATLEAST_ONCE the only ack happens in processWindow(), which walks the tuples of the window that just fired. A late message never enters a window, so it is never in that list. Window functions also rewrite functionDetails.processingGuarantees to MANUAL and delegate acking to WindowFunctionExecutor, so JavaInstanceRunnable does not ack it either.
Expected:
Under ATLEAST_ONCE, a message the runtime has decided not to process should still be acked, or explicitly failed, so the subscription cursor can move past it.
Error messages
There is no exception. The only signal is that log line, plus a growing backlog and unacked count on the function's input subscription when late event-time data arrives.
Reproducing the issue
- Deploy a Java window function with timestampExtractorClassName, windowLengthDurationMs, slidingIntervalDurationMs, maxLagMs and watermarkEmitIntervalMs set, processingGuarantees=ATLEAST_ONCE, and no lateDataTopic.
- Produce messages with increasing event timestamps so the watermark advances.
- Produce one message whose extracted timestamp is behind the current watermark.
- The log shows the late tuple line, the message never appears in any window invocation, and the input subscription never acks it. Running the same steps with ATMOST_ONCE acks the message.
Additional information
No response
Are you willing to submit a PR?
Search before reporting
Read release policy
User environment
Pulsar Functions, Java window function WindowFunctionExecutor.
Issue Description
What happened:
When an event-time window function receives a message whose extracted timestamp is behind the current watermark, WindowFunctionExecutor.process() treats it as a late tuple and keeps it out of the window. With lateDataTopic unset it logs Received a late tuple. This will not be processed. With lateDataTopic set it republishes the value there through sendAsync(). Neither path acks the record.
Under ATLEAST_ONCE the only ack happens in processWindow(), which walks the tuples of the window that just fired. A late message never enters a window, so it is never in that list. Window functions also rewrite functionDetails.processingGuarantees to MANUAL and delegate acking to WindowFunctionExecutor, so JavaInstanceRunnable does not ack it either.
Expected:
Under ATLEAST_ONCE, a message the runtime has decided not to process should still be acked, or explicitly failed, so the subscription cursor can move past it.
Error messages
Reproducing the issue
Additional information
No response
Are you willing to submit a PR?