[
https://issues.apache.org/jira/browse/BEAM-9874?focusedWorklogId=429962&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-429962
]
ASF GitHub Bot logged work on BEAM-9874:
----------------------------------------
Author: ASF GitHub Bot
Created on: 03/May/20 17:35
Start Date: 03/May/20 17:35
Worklog Time Spent: 10m
Work Description: mxm commented on a change in pull request #11597:
URL: https://github.com/apache/beam/pull/11597#discussion_r419134807
##########
File path:
runners/core-java/src/main/java/org/apache/beam/runners/core/InMemoryTimerInternals.java
##########
@@ -167,20 +165,17 @@ public void deleteTimer(StateNamespace namespace, String
timerId, TimeDomain tim
@Deprecated
@Override
public void deleteTimer(StateNamespace namespace, String timerId, String
timerFamilyId) {
- TimerData existing = existingTimers.get(namespace, timerId + '+' +
timerFamilyId);
- if (existing != null) {
- deleteTimer(existing);
+ TimerData removedTimer = existingTimers.remove(namespace, timerId + '+' +
timerFamilyId);
+ if (removedTimer != null) {
+ timersForDomain(removedTimer.getDomain()).remove(removedTimer);
}
}
/** @deprecated use {@link #deleteTimer(StateNamespace, String,
TimeDomain)}. */
@Deprecated
@Override
public void deleteTimer(TimerData timer) {
- WindowTracing.trace("{}.deleteTimer: {}", getClass().getSimpleName(),
timer);
- existingTimers.remove(
- timer.getNamespace(), timer.getTimerId() + '+' +
timer.getTimerFamilyId());
- timersForDomain(timer.getDomain()).remove(timer);
Review comment:
There was nasty bug here which prevented timer deletion because the
to-be-deleted TimerData had a different timestamp than the original timer,
leading to not actually deleting the timer from the map.
----------------------------------------------------------------
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: 429962)
Time Spent: 0.5h (was: 20m)
> Portable timers can't be cleared in batch mode
> ----------------------------------------------
>
> Key: BEAM-9874
> URL: https://issues.apache.org/jira/browse/BEAM-9874
> Project: Beam
> Issue Type: Bug
> Components: runner-flink, runner-spark
> Reporter: Maximilian Michels
> Assignee: Maximilian Michels
> Priority: Major
> Fix For: 2.21.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> After BEAM-9801, the {{test_pardo_timers_clear}} test fails. The test was
> probably broken before but we weren't depleting timers on shutdown.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)