[
https://issues.apache.org/jira/browse/BEAM-7112?focusedWorklogId=230509&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-230509
]
ASF GitHub Bot logged work on BEAM-7112:
----------------------------------------
Author: ASF GitHub Bot
Created on: 21/Apr/19 12:06
Start Date: 21/Apr/19 12:06
Worklog Time Spent: 10m
Work Description: mxm commented on pull request #8351: [BEAM-7112]
[flink] Defer state cleanup till bundle completion
URL: https://github.com/apache/beam/pull/8351#discussion_r277164943
##########
File path:
runners/flink/src/main/java/org/apache/beam/runners/flink/translation/wrappers/streaming/ExecutableStageDoFnOperator.java
##########
@@ -400,8 +398,35 @@ private void setTimer(WindowedValue<InputT> timerElement,
TimerInternals.TimerDa
}
}
+ @SuppressWarnings("ByteBufferBackingArray")
+ private void fireCleanupTimers() {
+ while (!cleanupTimers.isEmpty()) {
+ InternalTimer<?, TimerInternals.TimerData> timer =
cleanupTimers.remove();
+ final ByteBuffer encodedKey = (ByteBuffer) timer.getKey();
+ try {
+ // still need to process as timer, see CleanupTimer
+ stateBackendLock.lock();
Review comment:
Consider only locking once before processing all the timers, but probably
negligible.
----------------------------------------------------------------
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: 230509)
Time Spent: 3h 10m (was: 3h)
> 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
> Time Spent: 3h 10m
> 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)