Don't PanicWindows & triggers

Global window

A global window puts every event in one bucket that never closes until something else says so.

Global window - one window covering everything, for ever: under global window streaming semantics every event for a key lands in the same single bucket, and that bucket never closes on its own. It is what you get when you turn windowing off while keeping the windowing machinery on.

Because the window never ends, the honest default is to emit nothing. Flink pairs the global window with a trigger that never fires, so you must supply your own trigger (every 100 events, every 10 seconds) to see any output at all. State grows for as long as new keys keep arriving, which makes this the natural home of the unbounded-state accident.

Do you need it? The concept costs you a paragraph, and knowing it exists explains a lot of trigger documentation. As a thing you reach for, rarely. What people usually want from it is a running total per key, and that has a simpler spelling: a plain GROUP BY with no window, which in ubik is a continuous view, one running value per group republished as an upsert changelog on the --emit-every cadence, no trigger to write. The global window is mostly the cluster's way of spelling "no window".

Sources

Related