sandeep
03/27/2023, 9:01 PMallowedLateness is specified.
Say we are doing event time based processing. The initial watermarks are generated at the source. And then every operator computes its watermark as well. In case when there are parallel streams (or probably even multiple Kafka partitions to read from?), the watermark is the minimum across all inputs. If one of the parallel streams is paused (for whatever reason), the watermark would not advance and there would be no late events. But if the parallel stream was not paused, the watermark would be advancing and there would be some late events.
So how is event processing deterministic in this case?
Btw my understanding of Flink is limited, so some assumptions I made above about how Flink works could be wrong.David Anderson
03/27/2023, 9:55 PMsandeep
03/27/2023, 10:32 PMBoundedOutOfOrdernessWatermarks in the above scenario to remove the non-determinism in generating watermarks?David Anderson
03/27/2023, 10:36 PMDavid Anderson
03/27/2023, 10:39 PMsandeep
03/27/2023, 10:54 PMBoundedOutOfOrdernessWatermarks also emits watermarks periodically. Thank you for the above response, that makes sense.
One more follow up question. So can we really achieve determinism even if we emit watermark after every event?
It seems to me that even that may not be enough to achieve determinism as different partitions would still be consumed at different speeds. The watermark WindowOperator uses (minimum watermark across all partitions) to determine if an event is late still seems to depend upon the runtime state of the job. Right?David Anderson
03/27/2023, 11:24 PMDavid Anderson
03/27/2023, 11:26 PMsandeep
03/27/2023, 11:28 PM