[ 
https://issues.apache.org/jira/browse/FLINK-26334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

realdengziqi updated FLINK-26334:
---------------------------------
    Attachment: image-2022-03-04-11-37-10-035.png

> When timestamp - offset + windowSize < 0, elements cannot be assigned to the 
> correct window
> -------------------------------------------------------------------------------------------
>
>                 Key: FLINK-26334
>                 URL: https://issues.apache.org/jira/browse/FLINK-26334
>             Project: Flink
>          Issue Type: Bug
>          Components: API / DataStream
>    Affects Versions: 1.15.0, 1.14.3
>         Environment: flink version 1.14.3
>            Reporter: realdengziqi
>            Priority: Major
>         Attachments: image-2022-03-04-11-28-26-616.png, 
> image-2022-03-04-11-37-10-035.png
>
>   Original Estimate: 16h
>  Remaining Estimate: 16h
>
> h2. issue
>         Hello!
>         When we were studying the flink source code, we found that there was 
> a problem with its algorithm for calculating the window start time. When 
> timestamp - offset + windowSize < 0 , the element will be incorrectly 
> allocated to a window with a WindowSize larger than its own timestamp.
>         The problem is in 
> _org.apache.flink.streaming.api.windowing.windows.TimeWindow_
>  
> {code:java}
> public static long getWindowStartWithOffset(long timestamp, long offset, long 
> windowSize) {
>     return timestamp - (timestamp - offset + windowSize) % windowSize;
> } {code}
> _!image-2022-03-04-11-28-26-616.png|width=738,height=261!_
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to