[
https://issues.apache.org/jira/browse/BEAM-7112?focusedWorklogId=230132&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-230132
]
ASF GitHub Bot logged work on BEAM-7112:
----------------------------------------
Author: ASF GitHub Bot
Created on: 19/Apr/19 14:19
Start Date: 19/Apr/19 14:19
Worklog Time Spent: 10m
Work Description: tweise commented on issue #8351: [BEAM-7112] [flink]
Defer state cleanup till bundle completion
URL: https://github.com/apache/beam/pull/8351#issuecomment-484909706
@mxm there actually is a test for this: `test_pardo_state_timers`
I have to find out why it doesn't fail before this fix.
By adding logging I see that without the change cleanup gets executed before
the timer's state get:
```
[[1]statefulCount (2/8)] INFO
org.apache.beam.runners.flink.translation.wrappers.streaming.ExecutableStageDoFnOperator
- ###not deferred cleanup [107, 49] timer Timer{timestamp=-9223372036850000,
key=java.nio.HeapByteBuffer[pos=0 lim=2 cap=2],
namespace=TimerData{timerId=__user-state-cleanup__,
namespace=Window([-290308-12-21T19:59:05.225Z..-290308-12-21T19:59:10.000Z)),
timestamp=-290308-12-21T19:59:10.000Z, domain=EVENT_TIME}}
[[1]statefulCount (2/8)] INFO
org.apache.beam.runners.flink.translation.wrappers.streaming.ExecutableStageDoFnOperator
- ###clearForWindow [107, 49]
[-290308-12-21T19:59:05.225Z..-290308-12-21T19:59:10.000Z)
[grpc-default-executor-0] INFO
org.apache.beam.runners.flink.translation.wrappers.streaming.ExecutableStageDoFnOperator
- ###State get for ref_AppliedPTransform_statefulCount_8 count [2, 107, 49]
[-290308-12-21T19:59:05.225Z..-290308-12-21T19:59:10.000Z)
[grpc-default-executor-0] WARN bundle_processor.create_operation - No unique
name set for transform fn/read/ref_PCollection_PCollection_4:0
[grpc-default-executor-1] INFO flink_state.process_timer - ###timer fired
for count 5, window WindowParam
```
debug branch: https://github.com/tweise/beam/tree/state_cleanup_debug
----------------------------------------------------------------
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: 230132)
Time Spent: 1h 10m (was: 1h)
> 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: 1h 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)