[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=669788&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-669788 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 25/Oct/21 20:54 Start Date: 25/Oct/21 20:54 Worklog Time Spent: 10m Work Description: lukecwik commented on pull request #15794: URL: https://github.com/apache/beam/pull/15794#issuecomment-951321731 > LGTM Is this intended to be fixed, or is this planned not to be suppprted in the future? I have no intention to resolve BEAM-8543 just associating this PR with it. Hopefully at some point BEAM-8543 can be addressed for users. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 669788) Time Spent: 3h 40m (was: 3.5h) > Dataflow streaming timers are not strictly time ordered when set earlier > mid-bundle > --- > > Key: BEAM-8543 > URL: https://issues.apache.org/jira/browse/BEAM-8543 > Project: Beam > Issue Type: Bug > Components: runner-dataflow >Affects Versions: 2.13.0 >Reporter: Jan Lukavský >Priority: P3 > Time Spent: 3h 40m > Remaining Estimate: 0h > > Let's suppose we have the following situation: > - statful ParDo with two timers - timerA and timerB > - timerA is set for window.maxTimestamp() + 1 > - timerB is set anywhere between timerB.timestamp > - input watermark moves to BoundedWindow.TIMESTAMP_MAX_VALUE > Then the order of timers is as follows (correct): > - timerB > - timerA > But, if timerB sets another timer (say for timerB.timestamp + 1), then the > order of timers will be: > - timerB (timerB.timestamp) > - timerA (BoundedWindow.TIMESTAMP_MAX_VALUE) > - timerB (timerB.timestamp + 1) > Which is not ordered by timestamp. The reason for this is that when the input > watermark update is evaluated, the WatermarkManager,extractFiredTimers() will > produce both timerA and timerB. That would be correct, but when timerB sets > another timer, that breaks this. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=669789&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-669789 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 25/Oct/21 20:54 Start Date: 25/Oct/21 20:54 Worklog Time Spent: 10m Work Description: lukecwik merged pull request #15794: URL: https://github.com/apache/beam/pull/15794 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 669789) Time Spent: 3h 50m (was: 3h 40m) > Dataflow streaming timers are not strictly time ordered when set earlier > mid-bundle > --- > > Key: BEAM-8543 > URL: https://issues.apache.org/jira/browse/BEAM-8543 > Project: Beam > Issue Type: Bug > Components: runner-dataflow >Affects Versions: 2.13.0 >Reporter: Jan Lukavský >Priority: P3 > Time Spent: 3h 50m > Remaining Estimate: 0h > > Let's suppose we have the following situation: > - statful ParDo with two timers - timerA and timerB > - timerA is set for window.maxTimestamp() + 1 > - timerB is set anywhere between timerB.timestamp > - input watermark moves to BoundedWindow.TIMESTAMP_MAX_VALUE > Then the order of timers is as follows (correct): > - timerB > - timerA > But, if timerB sets another timer (say for timerB.timestamp + 1), then the > order of timers will be: > - timerB (timerB.timestamp) > - timerA (BoundedWindow.TIMESTAMP_MAX_VALUE) > - timerB (timerB.timestamp + 1) > Which is not ordered by timestamp. The reason for this is that when the input > watermark update is evaluated, the WatermarkManager,extractFiredTimers() will > produce both timerA and timerB. That would be correct, but when timerB sets > another timer, that breaks this. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=669775&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-669775 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 25/Oct/21 20:14 Start Date: 25/Oct/21 20:14 Worklog Time Spent: 10m Work Description: lukecwik commented on pull request #15794: URL: https://github.com/apache/beam/pull/15794#issuecomment-951273369 R: @je-ik CC: @apilloud -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 669775) Time Spent: 3.5h (was: 3h 20m) > Dataflow streaming timers are not strictly time ordered when set earlier > mid-bundle > --- > > Key: BEAM-8543 > URL: https://issues.apache.org/jira/browse/BEAM-8543 > Project: Beam > Issue Type: Bug > Components: runner-dataflow >Affects Versions: 2.13.0 >Reporter: Jan Lukavský >Priority: P3 > Time Spent: 3.5h > Remaining Estimate: 0h > > Let's suppose we have the following situation: > - statful ParDo with two timers - timerA and timerB > - timerA is set for window.maxTimestamp() + 1 > - timerB is set anywhere between timerB.timestamp > - input watermark moves to BoundedWindow.TIMESTAMP_MAX_VALUE > Then the order of timers is as follows (correct): > - timerB > - timerA > But, if timerB sets another timer (say for timerB.timestamp + 1), then the > order of timers will be: > - timerB (timerB.timestamp) > - timerA (BoundedWindow.TIMESTAMP_MAX_VALUE) > - timerB (timerB.timestamp + 1) > Which is not ordered by timestamp. The reason for this is that when the input > watermark update is evaluated, the WatermarkManager,extractFiredTimers() will > produce both timerA and timerB. That would be correct, but when timerB sets > another timer, that breaks this. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=669773&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-669773 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 25/Oct/21 20:13 Start Date: 25/Oct/21 20:13 Worklog Time Spent: 10m Work Description: lukecwik opened a new pull request #15794: URL: https://github.com/apache/beam/pull/15794 The test names seem to have changed since they are not being excluded so swap to using test category exclusion. See https://ci-beam.apache.org/job/beam_PostCommit_Java_VR_Dataflow_V2_Streaming/1378/testReport/ Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] [**Choose reviewer(s)**](https://beam.apache.org/contribute/#make-your-change) and mention them in a comment (`R: @username`). - [ ] Format the pull request title like `[BEAM-XXX] Fixes bug in ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue. - [ ] Update `CHANGES.md` with noteworthy changes. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://beam.apache.org/contribute/#make-reviewers-job-easier). `ValidatesRunner` compliance status (on master branch) Lang ULR Dataflow Flink Samza Spark Twister2 Go --- https://ci-beam.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/";> https://ci-beam.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/badge/icon";> https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Flink/lastCompletedBuild/";> https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Flink/lastCompletedBuild/badge/icon";> https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Samza/lastCompletedBuild/";> https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Samza/lastCompletedBuild/badge/icon";> https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Spark/lastCompletedBuild/";> https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Spark/lastCompletedBuild/badge/icon";> --- Java https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_ULR/lastCompletedBuild/";> https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_ULR/lastCompletedBuild/badge/icon";> https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/";> https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/badge/icon?subject=V1";> https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Streaming/lastCompletedBuild/";> https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Streaming/lastCompletedBuild/badge/icon?subject=V1+Streaming";> https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Java11/lastCompletedBuild/";> https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Java11/lastCompletedBuild/badge/icon?subject=V1+Java+11";> https://ci-beam.apache.org/job/beam_PostCommit_Java_VR_Dataflow_V2/lastCompletedBuild/";> https://ci-beam.apache.org/job/beam_PostCommit_Java_VR_Dataflow_V2/lastCompletedBuild/badge/icon?subject=V2";> https://ci-beam.apache.org/job/beam_PostCommit_Java_VR_Dataflow_V2_Streaming/lastCompletedBuild/";> https://ci-beam.apache.org/job/beam_PostCommit_Java_VR_Dataflow_V2_Streaming/lastCompletedBuild/badge/icon?subject=V2+Streaming";> https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/";> https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/badge/icon?subject=Java+8";> https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink_Java11/lastCompletedBuild/";> https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink_Java11/lastCompletedBuild/b
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=468070&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-468070 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 07/Aug/20 22:15 Start Date: 07/Aug/20 22:15 Worklog Time Spent: 10m Work Description: lukecwik commented on pull request #11924: URL: https://github.com/apache/beam/pull/11924#issuecomment-670746244 This PR enabled new tests which are failing with some of the validates runner tests. for example: https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/7773/testReport/ https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/7805/testReport/ Expanded existing JIRA: https://issues.apache.org/jira/browse/BEAM-8460, opened #12503 to disable failing test category. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 468070) Time Spent: 3h 10m (was: 3h) > Dataflow streaming timers are not strictly time ordered when set earlier > mid-bundle > --- > > Key: BEAM-8543 > URL: https://issues.apache.org/jira/browse/BEAM-8543 > Project: Beam > Issue Type: Bug > Components: runner-dataflow >Affects Versions: 2.13.0 >Reporter: Jan Lukavský >Assignee: Rehman Murad Ali >Priority: P2 > Fix For: 2.24.0 > > Time Spent: 3h 10m > Remaining Estimate: 0h > > Let's suppose we have the following situation: > - statful ParDo with two timers - timerA and timerB > - timerA is set for window.maxTimestamp() + 1 > - timerB is set anywhere between timerB.timestamp > - input watermark moves to BoundedWindow.TIMESTAMP_MAX_VALUE > Then the order of timers is as follows (correct): > - timerB > - timerA > But, if timerB sets another timer (say for timerB.timestamp + 1), then the > order of timers will be: > - timerB (timerB.timestamp) > - timerA (BoundedWindow.TIMESTAMP_MAX_VALUE) > - timerB (timerB.timestamp + 1) > Which is not ordered by timestamp. The reason for this is that when the input > watermark update is evaluated, the WatermarkManager,extractFiredTimers() will > produce both timerA and timerB. That would be correct, but when timerB sets > another timer, that breaks this. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=467533&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-467533 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 06/Aug/20 19:53 Start Date: 06/Aug/20 19:53 Worklog Time Spent: 10m Work Description: aaltay merged pull request #12424: URL: https://github.com/apache/beam/pull/12424 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 467533) Time Spent: 3h (was: 2h 50m) > Dataflow streaming timers are not strictly time ordered when set earlier > mid-bundle > --- > > Key: BEAM-8543 > URL: https://issues.apache.org/jira/browse/BEAM-8543 > Project: Beam > Issue Type: Bug > Components: runner-dataflow >Affects Versions: 2.13.0 >Reporter: Jan Lukavský >Assignee: Rehman Murad Ali >Priority: P2 > Fix For: 2.24.0 > > Time Spent: 3h > Remaining Estimate: 0h > > Let's suppose we have the following situation: > - statful ParDo with two timers - timerA and timerB > - timerA is set for window.maxTimestamp() + 1 > - timerB is set anywhere between timerB.timestamp > - input watermark moves to BoundedWindow.TIMESTAMP_MAX_VALUE > Then the order of timers is as follows (correct): > - timerB > - timerA > But, if timerB sets another timer (say for timerB.timestamp + 1), then the > order of timers will be: > - timerB (timerB.timestamp) > - timerA (BoundedWindow.TIMESTAMP_MAX_VALUE) > - timerB (timerB.timestamp + 1) > Which is not ordered by timestamp. The reason for this is that when the input > watermark update is evaluated, the WatermarkManager,extractFiredTimers() will > produce both timerA and timerB. That would be correct, but when timerB sets > another timer, that breaks this. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=464640&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-464640 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 30/Jul/20 16:33 Start Date: 30/Jul/20 16:33 Worklog Time Spent: 10m Work Description: rehmanmuradali commented on pull request #12424: URL: https://github.com/apache/beam/pull/12424#issuecomment-666510260 R: @kennknowles This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 464640) Time Spent: 2h 50m (was: 2h 40m) > Dataflow streaming timers are not strictly time ordered when set earlier > mid-bundle > --- > > Key: BEAM-8543 > URL: https://issues.apache.org/jira/browse/BEAM-8543 > Project: Beam > Issue Type: Bug > Components: runner-dataflow >Affects Versions: 2.13.0 >Reporter: Jan Lukavský >Priority: P2 > Time Spent: 2h 50m > Remaining Estimate: 0h > > Let's suppose we have the following situation: > - statful ParDo with two timers - timerA and timerB > - timerA is set for window.maxTimestamp() + 1 > - timerB is set anywhere between timerB.timestamp > - input watermark moves to BoundedWindow.TIMESTAMP_MAX_VALUE > Then the order of timers is as follows (correct): > - timerB > - timerA > But, if timerB sets another timer (say for timerB.timestamp + 1), then the > order of timers will be: > - timerB (timerB.timestamp) > - timerA (BoundedWindow.TIMESTAMP_MAX_VALUE) > - timerB (timerB.timestamp + 1) > Which is not ordered by timestamp. The reason for this is that when the input > watermark update is evaluated, the WatermarkManager,extractFiredTimers() will > produce both timerA and timerB. That would be correct, but when timerB sets > another timer, that breaks this. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=464639&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-464639 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 30/Jul/20 16:32 Start Date: 30/Jul/20 16:32 Worklog Time Spent: 10m Work Description: rehmanmuradali opened a new pull request #12424: URL: https://github.com/apache/beam/pull/12424 Updating changes.md Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] [**Choose reviewer(s)**](https://beam.apache.org/contribute/#make-your-change) and mention them in a comment (`R: @username`). - [ ] Format the pull request title like `[BEAM-XXX] Fixes bug in ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue. - [ ] Update `CHANGES.md` with noteworthy changes. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://beam.apache.org/contribute/#make-reviewers-job-easier). Post-Commit Tests Status (on master branch) Lang | SDK | Dataflow | Flink | Samza | Spark | Twister2 --- | --- | --- | --- | --- | --- | --- Go | [![Build Status](https://ci-beam.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/) | --- | [![Build Status](https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Flink/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Flink/lastCompletedBuild/) | --- | [![Build Status](https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Spark/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PostCommit_Go_VR_Spark/lastCompletedBuild/) | --- Java | [![Build Status](https://ci-beam.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/) | [![Build Status](https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/)[![Build Status](https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Java11/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Java11/lastCompletedBuild/) | [![Build Status](https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/)[![Build Status](https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink_Java11/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink_Java11/lastCompletedBuild/)[![Build Status](https://ci-beam.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/)[![Build Status](https://ci-beam.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/) | [![Build Status](https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/) | [![Build Status](https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/)[![Build Status](https://ci-beam.apache.org/job/beam_PostCommit_Java_PVR_Spark_Batch/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PostCommit_Java_PVR_Spark_Batch/lastCompletedBuild/)[![Build Status](https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_SparkStructuredStreaming/lastCompletedBuild/badge/icon)](https://ci-beam.apache.org/job/beam_PostCommit_Java_ValidatesRunner_SparkStructuredStreaming/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Twister2/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Twister2/lastCompletedBuild/) Python | [![Buil
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=464325&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-464325 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 30/Jul/20 07:29 Start Date: 30/Jul/20 07:29 Worklog Time Spent: 10m Work Description: kennknowles merged pull request #11924: URL: https://github.com/apache/beam/pull/11924 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 464325) Time Spent: 2.5h (was: 2h 20m) > Dataflow streaming timers are not strictly time ordered when set earlier > mid-bundle > --- > > Key: BEAM-8543 > URL: https://issues.apache.org/jira/browse/BEAM-8543 > Project: Beam > Issue Type: Bug > Components: runner-dataflow >Affects Versions: 2.13.0 >Reporter: Jan Lukavský >Priority: P2 > Time Spent: 2.5h > Remaining Estimate: 0h > > Let's suppose we have the following situation: > - statful ParDo with two timers - timerA and timerB > - timerA is set for window.maxTimestamp() + 1 > - timerB is set anywhere between timerB.timestamp > - input watermark moves to BoundedWindow.TIMESTAMP_MAX_VALUE > Then the order of timers is as follows (correct): > - timerB > - timerA > But, if timerB sets another timer (say for timerB.timestamp + 1), then the > order of timers will be: > - timerB (timerB.timestamp) > - timerA (BoundedWindow.TIMESTAMP_MAX_VALUE) > - timerB (timerB.timestamp + 1) > Which is not ordered by timestamp. The reason for this is that when the input > watermark update is evaluated, the WatermarkManager,extractFiredTimers() will > produce both timerA and timerB. That would be correct, but when timerB sets > another timer, that breaks this. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=464122&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-464122 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 29/Jul/20 17:38 Start Date: 29/Jul/20 17:38 Worklog Time Spent: 10m Work Description: rehmanmuradali commented on pull request #11924: URL: https://github.com/apache/beam/pull/11924#issuecomment-665687841 R: @kennknowles This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 464122) Time Spent: 1h 50m (was: 1h 40m) > Dataflow streaming timers are not strictly time ordered when set earlier > mid-bundle > --- > > Key: BEAM-8543 > URL: https://issues.apache.org/jira/browse/BEAM-8543 > Project: Beam > Issue Type: Bug > Components: runner-dataflow >Affects Versions: 2.13.0 >Reporter: Jan Lukavský >Priority: P2 > Time Spent: 1h 50m > Remaining Estimate: 0h > > Let's suppose we have the following situation: > - statful ParDo with two timers - timerA and timerB > - timerA is set for window.maxTimestamp() + 1 > - timerB is set anywhere between timerB.timestamp > - input watermark moves to BoundedWindow.TIMESTAMP_MAX_VALUE > Then the order of timers is as follows (correct): > - timerB > - timerA > But, if timerB sets another timer (say for timerB.timestamp + 1), then the > order of timers will be: > - timerB (timerB.timestamp) > - timerA (BoundedWindow.TIMESTAMP_MAX_VALUE) > - timerB (timerB.timestamp + 1) > Which is not ordered by timestamp. The reason for this is that when the input > watermark update is evaluated, the WatermarkManager,extractFiredTimers() will > produce both timerA and timerB. That would be correct, but when timerB sets > another timer, that breaks this. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=464238&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-464238 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 29/Jul/20 17:52 Start Date: 29/Jul/20 17:52 Worklog Time Spent: 10m Work Description: rehmanmuradali edited a comment on pull request #11924: URL: https://github.com/apache/beam/pull/11924#issuecomment-665687841 R: @kennknowles @reuvenlax This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 464238) Time Spent: 2h 20m (was: 2h 10m) > Dataflow streaming timers are not strictly time ordered when set earlier > mid-bundle > --- > > Key: BEAM-8543 > URL: https://issues.apache.org/jira/browse/BEAM-8543 > Project: Beam > Issue Type: Bug > Components: runner-dataflow >Affects Versions: 2.13.0 >Reporter: Jan Lukavský >Priority: P2 > Time Spent: 2h 20m > Remaining Estimate: 0h > > Let's suppose we have the following situation: > - statful ParDo with two timers - timerA and timerB > - timerA is set for window.maxTimestamp() + 1 > - timerB is set anywhere between timerB.timestamp > - input watermark moves to BoundedWindow.TIMESTAMP_MAX_VALUE > Then the order of timers is as follows (correct): > - timerB > - timerA > But, if timerB sets another timer (say for timerB.timestamp + 1), then the > order of timers will be: > - timerB (timerB.timestamp) > - timerA (BoundedWindow.TIMESTAMP_MAX_VALUE) > - timerB (timerB.timestamp + 1) > Which is not ordered by timestamp. The reason for this is that when the input > watermark update is evaluated, the WatermarkManager,extractFiredTimers() will > produce both timerA and timerB. That would be correct, but when timerB sets > another timer, that breaks this. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=464208&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-464208 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 29/Jul/20 17:48 Start Date: 29/Jul/20 17:48 Worklog Time Spent: 10m Work Description: rehmanmuradali commented on a change in pull request #11924: URL: https://github.com/apache/beam/pull/11924#discussion_r462327276 ## File path: runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingModeExecutionContext.java ## @@ -561,28 +554,64 @@ public void flushState() { return nextTimer; } -// Lazily initialized -private Iterator cachedFiredUserTimers = null; +private PriorityQueue toBeFiredTimersOrdered = null; + +// to track if timer is reset earlier mid-bundle. Review comment: Added ## File path: sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/ParDoTest.java ## @@ -3950,13 +3950,39 @@ public void testEventTimeTimerOrderingWithCreate() throws Exception { } testEventTimeTimerOrderingWithInputPTransform( - now, numTestElements, Create.timestamped(elements)); + now, numTestElements, Create.timestamped(elements), false); +} + +/** + * A test makes sure that an event time timers are correctly ordered using Create transform + * unbounded. + */ +@Test +@Category({ + ValidatesRunner.class, + UsesTimersInParDo.class, + UsesStatefulParDo.class, + UsesUnboundedPCollections.class, + UsesStrictTimerOrdering.class +}) +public void testEventTimeTimerOrderingWithCreateUnbounded() throws Exception { + final int numTestElements = 100; + final Instant now = new Instant(15000L); + + List>> elements = new ArrayList<>(); + for (int i = 0; i < numTestElements; i++) { +elements.add(TimestampedValue.of(KV.of("dummy", "" + i), now.plus(i))); + } + + testEventTimeTimerOrderingWithInputPTransform( + now, numTestElements, Create.timestamped(elements), true); } private void testEventTimeTimerOrderingWithInputPTransform( Instant now, int numTestElements, -PTransform>> transform) +PTransform>> transform, +boolean isStreaming) Review comment: Changed to IsBounded ## File path: sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/ParDoTest.java ## @@ -4307,18 +4346,26 @@ public void onTimer( private static class TwoTimerTest extends PTransform { private static PTransform of( - Instant start, Instant end, PTransform>> input) { -return new TwoTimerTest(start, end, input); + Instant start, + Instant end, + PTransform>> input, + boolean isStreaming) { +return new TwoTimerTest(start, end, input, isStreaming); } private final Instant start; private final Instant end; + private final boolean isStreaming; private final transient PTransform>> inputPTransform; public TwoTimerTest( - Instant start, Instant end, PTransform>> input) { + Instant start, + Instant end, + PTransform>> input, + boolean isStreaming) { Review comment: done ## File path: sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/ParDoTest.java ## @@ -4307,18 +4346,26 @@ public void onTimer( private static class TwoTimerTest extends PTransform { private static PTransform of( - Instant start, Instant end, PTransform>> input) { -return new TwoTimerTest(start, end, input); + Instant start, + Instant end, + PTransform>> input, + boolean isStreaming) { +return new TwoTimerTest(start, end, input, isStreaming); } private final Instant start; private final Instant end; + private final boolean isStreaming; Review comment: done This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 464208) Time Spent: 2h 10m (was: 2h) > Dataflow streaming timers are not strictly time ordered when set earlier > mid-bundle > --- > > Key: BEAM-8543 > URL: https://issues.apache.org/jira/browse/BEAM-8543 > Project: Beam > Issue Type: Bug >
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=464167&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-464167 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 29/Jul/20 17:43 Start Date: 29/Jul/20 17:43 Worklog Time Spent: 10m Work Description: kennknowles commented on pull request #11924: URL: https://github.com/apache/beam/pull/11924#issuecomment-665783296 run dataflow validatesrunner This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 464167) Time Spent: 2h (was: 1h 50m) > Dataflow streaming timers are not strictly time ordered when set earlier > mid-bundle > --- > > Key: BEAM-8543 > URL: https://issues.apache.org/jira/browse/BEAM-8543 > Project: Beam > Issue Type: Bug > Components: runner-dataflow >Affects Versions: 2.13.0 >Reporter: Jan Lukavský >Priority: P2 > Time Spent: 2h > Remaining Estimate: 0h > > Let's suppose we have the following situation: > - statful ParDo with two timers - timerA and timerB > - timerA is set for window.maxTimestamp() + 1 > - timerB is set anywhere between timerB.timestamp > - input watermark moves to BoundedWindow.TIMESTAMP_MAX_VALUE > Then the order of timers is as follows (correct): > - timerB > - timerA > But, if timerB sets another timer (say for timerB.timestamp + 1), then the > order of timers will be: > - timerB (timerB.timestamp) > - timerA (BoundedWindow.TIMESTAMP_MAX_VALUE) > - timerB (timerB.timestamp + 1) > Which is not ordered by timestamp. The reason for this is that when the input > watermark update is evaluated, the WatermarkManager,extractFiredTimers() will > produce both timerA and timerB. That would be correct, but when timerB sets > another timer, that breaks this. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=462706&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-462706 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 23/Jul/20 21:20 Start Date: 23/Jul/20 21:20 Worklog Time Spent: 10m Work Description: kennknowles commented on a change in pull request #11924: URL: https://github.com/apache/beam/pull/11924#discussion_r459729767 ## File path: runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingModeExecutionContext.java ## @@ -24,18 +24,11 @@ import com.google.api.services.dataflow.model.SideInputInfo; import java.io.Closeable; import java.io.IOException; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; Review comment: Please keep the imports all explicit. ## File path: sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/ParDoTest.java ## @@ -3950,13 +3950,39 @@ public void testEventTimeTimerOrderingWithCreate() throws Exception { } testEventTimeTimerOrderingWithInputPTransform( - now, numTestElements, Create.timestamped(elements)); + now, numTestElements, Create.timestamped(elements), false); +} + +/** + * A test makes sure that an event time timers are correctly ordered using Create transform + * unbounded. + */ +@Test +@Category({ + ValidatesRunner.class, + UsesTimersInParDo.class, + UsesStatefulParDo.class, + UsesUnboundedPCollections.class, + UsesStrictTimerOrdering.class +}) +public void testEventTimeTimerOrderingWithCreateUnbounded() throws Exception { + final int numTestElements = 100; + final Instant now = new Instant(15000L); + + List>> elements = new ArrayList<>(); + for (int i = 0; i < numTestElements; i++) { +elements.add(TimestampedValue.of(KV.of("dummy", "" + i), now.plus(i))); + } + + testEventTimeTimerOrderingWithInputPTransform( + now, numTestElements, Create.timestamped(elements), true); } private void testEventTimeTimerOrderingWithInputPTransform( Instant now, int numTestElements, -PTransform>> transform) +PTransform>> transform, +boolean isStreaming) Review comment: This doesn't depend on streaming or not, but just controls whether the pcollection should be bounded or unbounded. For clarity, you can just make this parameter `IsBounded isBounded` ## File path: sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/ParDoTest.java ## @@ -4307,18 +4346,26 @@ public void onTimer( private static class TwoTimerTest extends PTransform { private static PTransform of( - Instant start, Instant end, PTransform>> input) { -return new TwoTimerTest(start, end, input); + Instant start, + Instant end, + PTransform>> input, + boolean isStreaming) { +return new TwoTimerTest(start, end, input, isStreaming); } private final Instant start; private final Instant end; + private final boolean isStreaming; private final transient PTransform>> inputPTransform; public TwoTimerTest( - Instant start, Instant end, PTransform>> input) { + Instant start, + Instant end, + PTransform>> input, + boolean isStreaming) { Review comment: same here ## File path: sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/ParDoTest.java ## @@ -4307,18 +4346,26 @@ public void onTimer( private static class TwoTimerTest extends PTransform { private static PTransform of( - Instant start, Instant end, PTransform>> input) { -return new TwoTimerTest(start, end, input); + Instant start, + Instant end, + PTransform>> input, + boolean isStreaming) { +return new TwoTimerTest(start, end, input, isStreaming); } private final Instant start; private final Instant end; + private final boolean isStreaming; Review comment: same here ## File path: sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/ParDoTest.java ## @@ -4331,6 +4378,7 @@ public PDone expand(PBegin input) { PCollection result = input .apply(inputPTransform) +.setIsBoundedInternal(isStreaming ? IsBounded.UNBOUNDED : IsBounded.BOUNDED) Review comment: Another way to do this that might be better is to use `TestStream` in the unbounded case. This will probably give best coverage. Even for an unbounded PCollection the watermark might instantl
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=448118&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-448118 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 18/Jun/20 23:47 Start Date: 18/Jun/20 23:47 Worklog Time Spent: 10m Work Description: ajamato commented on pull request #11924: URL: https://github.com/apache/beam/pull/11924#issuecomment-646360018 @kennknowles Would you mind following up on this PR? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 448118) Time Spent: 1.5h (was: 1h 20m) > Dataflow streaming timers are not strictly time ordered when set earlier > mid-bundle > --- > > Key: BEAM-8543 > URL: https://issues.apache.org/jira/browse/BEAM-8543 > Project: Beam > Issue Type: Bug > Components: runner-dataflow >Affects Versions: 2.13.0 >Reporter: Jan Lukavský >Assignee: Rehman Murad Ali >Priority: P2 > Time Spent: 1.5h > Remaining Estimate: 0h > > Let's suppose we have the following situation: > - statful ParDo with two timers - timerA and timerB > - timerA is set for window.maxTimestamp() + 1 > - timerB is set anywhere between timerB.timestamp > - input watermark moves to BoundedWindow.TIMESTAMP_MAX_VALUE > Then the order of timers is as follows (correct): > - timerB > - timerA > But, if timerB sets another timer (say for timerB.timestamp + 1), then the > order of timers will be: > - timerB (timerB.timestamp) > - timerA (BoundedWindow.TIMESTAMP_MAX_VALUE) > - timerB (timerB.timestamp + 1) > Which is not ordered by timestamp. The reason for this is that when the input > watermark update is evaluated, the WatermarkManager,extractFiredTimers() will > produce both timerA and timerB. That would be correct, but when timerB sets > another timer, that breaks this. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=443887&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-443887 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 10/Jun/20 17:54 Start Date: 10/Jun/20 17:54 Worklog Time Spent: 10m Work Description: rehmanmuradali commented on a change in pull request #11924: URL: https://github.com/apache/beam/pull/11924#discussion_r438307437 ## File path: sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/ParDoTest.java ## @@ -4040,7 +4043,8 @@ public void onTimer( } }; - PCollection output = pipeline.apply(transform).apply(ParDo.of(fn)); + PCollection output = + pipeline.apply(transform).setIsBoundedInternal(IsBounded.UNBOUNDED).apply(ParDo.of(fn)); Review comment: Added a new test case This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 443887) Time Spent: 1h 10m (was: 1h) > Dataflow streaming timers are not strictly time ordered when set earlier > mid-bundle > --- > > Key: BEAM-8543 > URL: https://issues.apache.org/jira/browse/BEAM-8543 > Project: Beam > Issue Type: Bug > Components: runner-dataflow >Affects Versions: 2.13.0 >Reporter: Jan Lukavský >Assignee: Rehman Murad Ali >Priority: P2 > Time Spent: 1h 10m > Remaining Estimate: 0h > > Let's suppose we have the following situation: > - statful ParDo with two timers - timerA and timerB > - timerA is set for window.maxTimestamp() + 1 > - timerB is set anywhere between timerB.timestamp > - input watermark moves to BoundedWindow.TIMESTAMP_MAX_VALUE > Then the order of timers is as follows (correct): > - timerB > - timerA > But, if timerB sets another timer (say for timerB.timestamp + 1), then the > order of timers will be: > - timerB (timerB.timestamp) > - timerA (BoundedWindow.TIMESTAMP_MAX_VALUE) > - timerB (timerB.timestamp + 1) > Which is not ordered by timestamp. The reason for this is that when the input > watermark update is evaluated, the WatermarkManager,extractFiredTimers() will > produce both timerA and timerB. That would be correct, but when timerB sets > another timer, that breaks this. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=443888&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-443888 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 10/Jun/20 17:54 Start Date: 10/Jun/20 17:54 Worklog Time Spent: 10m Work Description: rehmanmuradali commented on a change in pull request #11924: URL: https://github.com/apache/beam/pull/11924#discussion_r438307621 ## File path: runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingModeExecutionContext.java ## @@ -577,12 +583,21 @@ public void flushState() { WindmillTimerInternals.windmillTimerToTimerData( WindmillNamespacePrefix.USER_NAMESPACE_PREFIX, timer, windowCoder)) .iterator(); + +cachedFiredUserTimers.forEachRemaining(toBeFiredTimersOrdered::add); Review comment: done This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 443888) Time Spent: 1h 20m (was: 1h 10m) > Dataflow streaming timers are not strictly time ordered when set earlier > mid-bundle > --- > > Key: BEAM-8543 > URL: https://issues.apache.org/jira/browse/BEAM-8543 > Project: Beam > Issue Type: Bug > Components: runner-dataflow >Affects Versions: 2.13.0 >Reporter: Jan Lukavský >Assignee: Rehman Murad Ali >Priority: P2 > Time Spent: 1h 20m > Remaining Estimate: 0h > > Let's suppose we have the following situation: > - statful ParDo with two timers - timerA and timerB > - timerA is set for window.maxTimestamp() + 1 > - timerB is set anywhere between timerB.timestamp > - input watermark moves to BoundedWindow.TIMESTAMP_MAX_VALUE > Then the order of timers is as follows (correct): > - timerB > - timerA > But, if timerB sets another timer (say for timerB.timestamp + 1), then the > order of timers will be: > - timerB (timerB.timestamp) > - timerA (BoundedWindow.TIMESTAMP_MAX_VALUE) > - timerB (timerB.timestamp + 1) > Which is not ordered by timestamp. The reason for this is that when the input > watermark update is evaluated, the WatermarkManager,extractFiredTimers() will > produce both timerA and timerB. That would be correct, but when timerB sets > another timer, that breaks this. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=443885&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-443885 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 10/Jun/20 17:53 Start Date: 10/Jun/20 17:53 Worklog Time Spent: 10m Work Description: rehmanmuradali commented on a change in pull request #11924: URL: https://github.com/apache/beam/pull/11924#discussion_r438306969 ## File path: runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingModeExecutionContext.java ## @@ -577,12 +583,21 @@ public void flushState() { WindmillTimerInternals.windmillTimerToTimerData( WindmillNamespacePrefix.USER_NAMESPACE_PREFIX, timer, windowCoder)) .iterator(); + +cachedFiredUserTimers.forEachRemaining(toBeFiredTimersOrdered::add); + } + + Instant currentInputWatermark = userTimerInternals.currentInputWatermarkTime(); + if (userTimerInternals.hasTimerBefore(currentInputWatermark)) { +while (!toBeFiredTimersOrdered.isEmpty()) { + userTimerInternals.setTimer(toBeFiredTimersOrdered.poll()); +} } Review comment: @reuvenlax done This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 443885) Time Spent: 50m (was: 40m) > Dataflow streaming timers are not strictly time ordered when set earlier > mid-bundle > --- > > Key: BEAM-8543 > URL: https://issues.apache.org/jira/browse/BEAM-8543 > Project: Beam > Issue Type: Bug > Components: runner-dataflow >Affects Versions: 2.13.0 >Reporter: Jan Lukavský >Assignee: Rehman Murad Ali >Priority: P2 > Time Spent: 50m > Remaining Estimate: 0h > > Let's suppose we have the following situation: > - statful ParDo with two timers - timerA and timerB > - timerA is set for window.maxTimestamp() + 1 > - timerB is set anywhere between timerB.timestamp > - input watermark moves to BoundedWindow.TIMESTAMP_MAX_VALUE > Then the order of timers is as follows (correct): > - timerB > - timerA > But, if timerB sets another timer (say for timerB.timestamp + 1), then the > order of timers will be: > - timerB (timerB.timestamp) > - timerA (BoundedWindow.TIMESTAMP_MAX_VALUE) > - timerB (timerB.timestamp + 1) > Which is not ordered by timestamp. The reason for this is that when the input > watermark update is evaluated, the WatermarkManager,extractFiredTimers() will > produce both timerA and timerB. That would be correct, but when timerB sets > another timer, that breaks this. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=443886&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-443886 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 10/Jun/20 17:53 Start Date: 10/Jun/20 17:53 Worklog Time Spent: 10m Work Description: rehmanmuradali commented on a change in pull request #11924: URL: https://github.com/apache/beam/pull/11924#discussion_r438307281 ## File path: sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/ParDoTest.java ## @@ -3938,10 +3939,11 @@ public void testEventTimeTimerOrdering() throws Exception { ValidatesRunner.class, UsesTimersInParDo.class, UsesStatefulParDo.class, + UsesUnboundedPCollections.class, UsesStrictTimerOrdering.class }) public void testEventTimeTimerOrderingWithCreate() throws Exception { - final int numTestElements = 100; + final int numTestElements = 5; Review comment: reverted. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 443886) Time Spent: 1h (was: 50m) > Dataflow streaming timers are not strictly time ordered when set earlier > mid-bundle > --- > > Key: BEAM-8543 > URL: https://issues.apache.org/jira/browse/BEAM-8543 > Project: Beam > Issue Type: Bug > Components: runner-dataflow >Affects Versions: 2.13.0 >Reporter: Jan Lukavský >Assignee: Rehman Murad Ali >Priority: P2 > Time Spent: 1h > Remaining Estimate: 0h > > Let's suppose we have the following situation: > - statful ParDo with two timers - timerA and timerB > - timerA is set for window.maxTimestamp() + 1 > - timerB is set anywhere between timerB.timestamp > - input watermark moves to BoundedWindow.TIMESTAMP_MAX_VALUE > Then the order of timers is as follows (correct): > - timerB > - timerA > But, if timerB sets another timer (say for timerB.timestamp + 1), then the > order of timers will be: > - timerB (timerB.timestamp) > - timerA (BoundedWindow.TIMESTAMP_MAX_VALUE) > - timerB (timerB.timestamp + 1) > Which is not ordered by timestamp. The reason for this is that when the input > watermark update is evaluated, the WatermarkManager,extractFiredTimers() will > produce both timerA and timerB. That would be correct, but when timerB sets > another timer, that breaks this. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=442037&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-442037 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 05/Jun/20 21:35 Start Date: 05/Jun/20 21:35 Worklog Time Spent: 10m Work Description: kennknowles commented on a change in pull request #11924: URL: https://github.com/apache/beam/pull/11924#discussion_r436173779 ## File path: sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/ParDoTest.java ## @@ -3938,10 +3939,11 @@ public void testEventTimeTimerOrdering() throws Exception { ValidatesRunner.class, UsesTimersInParDo.class, UsesStatefulParDo.class, + UsesUnboundedPCollections.class, UsesStrictTimerOrdering.class }) public void testEventTimeTimerOrderingWithCreate() throws Exception { - final int numTestElements = 100; + final int numTestElements = 5; Review comment: Why shrink it? Does the test get really slow? Is this going to be a perf problem overall? ## File path: runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingModeExecutionContext.java ## @@ -577,12 +583,21 @@ public void flushState() { WindmillTimerInternals.windmillTimerToTimerData( WindmillNamespacePrefix.USER_NAMESPACE_PREFIX, timer, windowCoder)) .iterator(); + +cachedFiredUserTimers.forEachRemaining(toBeFiredTimersOrdered::add); + } + + Instant currentInputWatermark = userTimerInternals.currentInputWatermarkTime(); + if (userTimerInternals.hasTimerBefore(currentInputWatermark)) { +while (!toBeFiredTimersOrdered.isEmpty()) { + userTimerInternals.setTimer(toBeFiredTimersOrdered.poll()); +} } Review comment: Yea I don't actually understand what this block is for. FWIW to do timer deletion/reset cheaply without building a bespoke data structure just keep a map from id to firing time or tombstone. This way, whenever a timer comes up in the prio queue you pull out the actual time for it from the map. If it is actually set for another time, don't fire it. If it is obsolete, don't fire it. ## File path: runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingModeExecutionContext.java ## @@ -577,12 +583,21 @@ public void flushState() { WindmillTimerInternals.windmillTimerToTimerData( WindmillNamespacePrefix.USER_NAMESPACE_PREFIX, timer, windowCoder)) .iterator(); + +cachedFiredUserTimers.forEachRemaining(toBeFiredTimersOrdered::add); Review comment: Do we even need `cachedFiredUserTimers`? It seems obsolete if we populate the priority queue. The name is also wrong - even before this PR it wasn't a cache. It is a lazily initialized iterator. Instead, we should have a lazily initialized priority queue (like you do) and just a flag to say whether the incoming timers have been loaded yet. ## File path: sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/ParDoTest.java ## @@ -4040,7 +4043,8 @@ public void onTimer( } }; - PCollection output = pipeline.apply(transform).apply(ParDo.of(fn)); + PCollection output = + pipeline.apply(transform).setIsBoundedInternal(IsBounded.UNBOUNDED).apply(ParDo.of(fn)); Review comment: Should not be calling `setIsBoundedInternal` here. Is this just to force streaming mode? We need to just create a separate run of ValidatesRunner that forces streaming mode. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 442037) Time Spent: 40m (was: 0.5h) > Dataflow streaming timers are not strictly time ordered when set earlier > mid-bundle > --- > > Key: BEAM-8543 > URL: https://issues.apache.org/jira/browse/BEAM-8543 > Project: Beam > Issue Type: Bug > Components: runner-dataflow >Affects Versions: 2.13.0 >Reporter: Jan Lukavský >Assignee: Rehman Murad Ali >Priority: P2 > Time Spent: 40m > Remaining Estimate: 0h > > Let's suppose we have the following situation: > - statful ParDo with two timers - timerA and timerB > - timerA is se
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=442024&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-442024 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 05/Jun/20 20:24 Start Date: 05/Jun/20 20:24 Worklog Time Spent: 10m Work Description: reuvenlax commented on a change in pull request #11924: URL: https://github.com/apache/beam/pull/11924#discussion_r436147265 ## File path: runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingModeExecutionContext.java ## @@ -577,12 +583,21 @@ public void flushState() { WindmillTimerInternals.windmillTimerToTimerData( WindmillNamespacePrefix.USER_NAMESPACE_PREFIX, timer, windowCoder)) .iterator(); + +cachedFiredUserTimers.forEachRemaining(toBeFiredTimersOrdered::add); + } + + Instant currentInputWatermark = userTimerInternals.currentInputWatermarkTime(); + if (userTimerInternals.hasTimerBefore(currentInputWatermark)) { +while (!toBeFiredTimersOrdered.isEmpty()) { + userTimerInternals.setTimer(toBeFiredTimersOrdered.poll()); +} } Review comment: @kennknowles for comment. This doesn't look right to me, as I don't think we should be modifying the WindmillTimerInternals here. I think we just want to merge the timer modifications from processing the workitem into this priority queue; note that if timers are deleted, we need to detect that as well and remove from the priority queue. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 442024) Time Spent: 0.5h (was: 20m) > Dataflow streaming timers are not strictly time ordered when set earlier > mid-bundle > --- > > Key: BEAM-8543 > URL: https://issues.apache.org/jira/browse/BEAM-8543 > Project: Beam > Issue Type: Bug > Components: runner-dataflow >Affects Versions: 2.13.0 >Reporter: Jan Lukavský >Assignee: Rehman Murad Ali >Priority: P2 > Time Spent: 0.5h > Remaining Estimate: 0h > > Let's suppose we have the following situation: > - statful ParDo with two timers - timerA and timerB > - timerA is set for window.maxTimestamp() + 1 > - timerB is set anywhere between timerB.timestamp > - input watermark moves to BoundedWindow.TIMESTAMP_MAX_VALUE > Then the order of timers is as follows (correct): > - timerB > - timerA > But, if timerB sets another timer (say for timerB.timestamp + 1), then the > order of timers will be: > - timerB (timerB.timestamp) > - timerA (BoundedWindow.TIMESTAMP_MAX_VALUE) > - timerB (timerB.timestamp + 1) > Which is not ordered by timestamp. The reason for this is that when the input > watermark update is evaluated, the WatermarkManager,extractFiredTimers() will > produce both timerA and timerB. That would be correct, but when timerB sets > another timer, that breaks this. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=441501&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-441501 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 04/Jun/20 20:08 Start Date: 04/Jun/20 20:08 Worklog Time Spent: 10m Work Description: rehmanmuradali commented on pull request #11924: URL: https://github.com/apache/beam/pull/11924#issuecomment-639088647 R: @reuvenlax Could you please take a look that I am on right track? This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 441501) Time Spent: 20m (was: 10m) > Dataflow streaming timers are not strictly time ordered when set earlier > mid-bundle > --- > > Key: BEAM-8543 > URL: https://issues.apache.org/jira/browse/BEAM-8543 > Project: Beam > Issue Type: Bug > Components: runner-dataflow >Affects Versions: 2.13.0 >Reporter: Jan Lukavský >Assignee: Rehman Murad Ali >Priority: P2 > Time Spent: 20m > Remaining Estimate: 0h > > Let's suppose we have the following situation: > - statful ParDo with two timers - timerA and timerB > - timerA is set for window.maxTimestamp() + 1 > - timerB is set anywhere between timerB.timestamp > - input watermark moves to BoundedWindow.TIMESTAMP_MAX_VALUE > Then the order of timers is as follows (correct): > - timerB > - timerA > But, if timerB sets another timer (say for timerB.timestamp + 1), then the > order of timers will be: > - timerB (timerB.timestamp) > - timerA (BoundedWindow.TIMESTAMP_MAX_VALUE) > - timerB (timerB.timestamp + 1) > Which is not ordered by timestamp. The reason for this is that when the input > watermark update is evaluated, the WatermarkManager,extractFiredTimers() will > produce both timerA and timerB. That would be correct, but when timerB sets > another timer, that breaks this. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Work logged] (BEAM-8543) Dataflow streaming timers are not strictly time ordered when set earlier mid-bundle
[ https://issues.apache.org/jira/browse/BEAM-8543?focusedWorklogId=441499&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-441499 ] ASF GitHub Bot logged work on BEAM-8543: Author: ASF GitHub Bot Created on: 04/Jun/20 19:59 Start Date: 04/Jun/20 19:59 Worklog Time Spent: 10m Work Description: rehmanmuradali opened a new pull request #11924: URL: https://github.com/apache/beam/pull/11924 Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] [**Choose reviewer(s)**](https://beam.apache.org/contribute/#make-your-change) and mention them in a comment (`R: @username`). - [ ] Format the pull request title like `[BEAM-XXX] Fixes bug in ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue. - [ ] Update `CHANGES.md` with noteworthy changes. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://beam.apache.org/contribute/#make-reviewers-job-easier). Post-Commit Tests Status (on master branch) Lang | SDK | Apex | Dataflow | Flink | Gearpump | Samza | Spark --- | --- | --- | --- | --- | --- | --- | --- Go | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/) | --- | --- | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Go_VR_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go_VR_Flink/lastCompletedBuild/) | --- | --- | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Go_VR_Spark/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go_VR_Spark/lastCompletedBuild/) Java | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/)[![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Java11/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Java11/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/)[![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink_Java11/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink_Java11/lastCompletedBuild/)[![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/)[![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/)[![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Spark_Batch/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Spark_Batch/lastCompletedBuild/)[![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_