Closed dkruchinin closed 6 years ago
Thanks for the detailed report! Taking a close look.
At this point, the SDK in question is deprecated. Can you reproduce it with the latest Beam SDK? If so, comment here and/or in a Beam JIRA. I'm going to close this one, though.
I've got a simple test that demonstrate an odd behaviour of sliding window when used with TestPipeline. Basically a bunch of strings is fed to the input, then they get accumulated in the sliding window, then the sum aggregation is applied to count the duplicates and finally the output of the aggregation function is logged. With a sliding window of 10 minutes duration and 5 minutes period the pipeline should produce two intersecting windows: [-5, 5] and [0, 10]...
but that's what I get instead:
As you can see there're three windows instead of two and all three strings get to the "extra" window that doesn't intersect in any way with the other two.
Now the interesting thing, if you uncomment .apply(ParDo.of(new OutputWithCurrentTsFn())) line and run the test again, it works as expected producing only two intersecting sliding windows:
SDK version: 1.8.0
P/S: based on http://stackoverflow.com/questions/40527677/odd-behaviour-of-slidingwindows-when-used-with-testpipeline/40537541