TU-Berlin-DIMA / scotty-window-processor

This repository provides Scotty, a framework for efficient window aggregations for out-of-order Stream Processing.
https://tu-berlin-dima.github.io/scotty-window-processor/
Apache License 2.0
75 stars 23 forks source link

[Bug] Stream Slicer stuck in Loop #50

Closed julianev closed 2 years ago

julianev commented 2 years ago

For a sliding window with size = 10 and slide = 4, the StreamSlicer does not get out of the while loop when processing the first tuple.

https://github.com/TU-Berlin-DIMA/scotty-window-processor/blob/2a6b33941ac1733fb7b8db2cece04b2afc61d40f/slicing/src/main/java/de/tub/dima/scotty/slicing/StreamSlicer.java#L65-L69

Reason: For its first call, assignNextWindowStart receives Long.MAX_VALUE as t_c and returns Long.MIN_VALUE because of the slide value 4. The variable min_next_edge_ts remains Long.MIN_VALUE and is again set to Long.MAX_VALUE in the next iteration of the loop.

https://github.com/TU-Berlin-DIMA/scotty-window-processor/blob/2a6b33941ac1733fb7b8db2cece04b2afc61d40f/slicing/src/main/java/de/tub/dima/scotty/slicing/StreamSlicer.java#L103-L116