[
https://issues.apache.org/jira/browse/BEAM-7112?focusedWorklogId=232916&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-232916
]
ASF GitHub Bot logged work on BEAM-7112:
----------------------------------------
Author: ASF GitHub Bot
Created on: 25/Apr/19 14:40
Start Date: 25/Apr/19 14:40
Worklog Time Spent: 10m
Work Description: mxm commented on pull request #8399: [BEAM-7112] Timer
race with state cleanup - take two
URL: https://github.com/apache/beam/pull/8399#discussion_r278583803
##########
File path:
runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/ExecutableStageDoFnOperator.java
##########
@@ -401,7 +402,14 @@ private void setTimer(WindowedValue<InputT> timerElement,
TimerInternals.TimerDa
@SuppressWarnings("ByteBufferBackingArray")
private void fireCleanupTimers() {
while (!cleanupTimers.isEmpty()) {
- InternalTimer<?, TimerInternals.TimerData> timer =
cleanupTimers.remove();
+ KV<RemoteBundle, InternalTimer<?, TimerInternals.TimerData>> kv =
cleanupTimers.peek();
+ if (kv.getKey() != null && kv.getKey() == sdkHarnessRunner.remoteBundle)
{
+ // user timer and cleanup may trigger together in finish bundle,
+ // defer state cleanup to allow user timers to complete
+ return;
Review comment:
Let's move it to where it belongs, i.e. after the bundle has been finished.
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 232916)
Time Spent: 5h 40m (was: 5.5h)
> State cleanup interferes with user timer callback
> -------------------------------------------------
>
> Key: BEAM-7112
> URL: https://issues.apache.org/jira/browse/BEAM-7112
> Project: Beam
> Issue Type: Bug
> Components: runner-flink
> Affects Versions: 2.12.0
> Reporter: Thomas Weise
> Assignee: Thomas Weise
> Priority: Major
> Labels: portability-flink
> Fix For: 2.13.0
>
> Time Spent: 5h 40m
> Remaining Estimate: 0h
>
> Cleanup timers and user timers are fired at the watermark. Processing of
> timers in the SDK worker is asynchronous, so it is possible that the state is
> already removed when the user timer callback executes.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)