flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mxm <...@git.apache.org>
Subject [GitHub] flink pull request #2671: [FLINK-4862] fix Timer register in ContinuousEvent...
Date Fri, 21 Oct 2016 13:16:17 GMT
Github user mxm commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2671#discussion_r84465211
  
    --- Diff: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/windowing/triggers/ContinuousEventTimeTrigger.java
---
    @@ -88,9 +96,13 @@ public TriggerResult onProcessingTime(long time, W window, TriggerContext
ctx) t
     	@Override
     	public void clear(W window, TriggerContext ctx) throws Exception {
     		ReducingState<Long> fireTimestamp = ctx.getPartitionedState(stateDesc);
    -		long timestamp = fireTimestamp.get();
    -		ctx.deleteEventTimeTimer(timestamp);
    -		fireTimestamp.clear();
    +		Long timestamp = fireTimestamp.get();
    +		if (timestamp != null) {
    +			ctx.deleteEventTimeTimer(timestamp);
    +			fireTimestamp.clear();
    +		} else if (cachedFireTimestamp != null){
    +			ctx.deleteEventTimeTimer(cachedFireTimestamp);
    +		}
    --- End diff --
    
    I think we're fine with not doing anything when `timestamp == null`. The old timer won't
influence the newly merged window.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message