Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 92F52200D18 for ; Wed, 11 Oct 2017 14:40:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 91777160BE4; Wed, 11 Oct 2017 12:40:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E0BAF1609CA for ; Wed, 11 Oct 2017 14:40:04 +0200 (CEST) Received: (qmail 14902 invoked by uid 500); 11 Oct 2017 12:40:04 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 14892 invoked by uid 99); 11 Oct 2017 12:40:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Oct 2017 12:40:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 336391A6055 for ; Wed, 11 Oct 2017 12:40:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -98.689 X-Spam-Level: X-Spam-Status: No, score=-98.689 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URI_HEX=1.313, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id Vy-uJTv1HZN9 for ; Wed, 11 Oct 2017 12:40:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 12BDD5FD01 for ; Wed, 11 Oct 2017 12:40:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 92CD2E0EFC for ; Wed, 11 Oct 2017 12:40:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 4A5C82539A for ; Wed, 11 Oct 2017 12:40:00 +0000 (UTC) Date: Wed, 11 Oct 2017 12:40:00 +0000 (UTC) From: "Gerard Garcia (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-7731) Trigger on GlobalWindow does not clean state completely MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 11 Oct 2017 12:40:05 -0000 [ https://issues.apache.org/jira/browse/FLINK-7731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16200208#comment-16200208 ] Gerard Garcia commented on FLINK-7731: -------------------------------------- I tried that but it still doesn't work. I have been doing some debugging and it seems to me that the timer never gets triggered. It may be that what is happening is that the {{onProcessingTime}} callback is only triggered when there are contents in the window state (all code snippets are from version 1.3.2): org.apache.flink.streaming.runtime.operators.windowing.WindowOperator#onProcessingTime() {code:java} ACC contents = null; if (windowState != null) { contents = windowState.get(); } if (contents != null) { TriggerResult triggerResult = triggerContext.onProcessingTime(timer.getTimestamp()); if (triggerResult.isFire()) { emitWindowContents(triggerContext.window, contents); } if (triggerResult.isPurge()) { windowState.clear(); } } {code} and that state is being cleared when the trigger result is type purge: org.apache.flink.streaming.runtime.operators.windowing.WindowOperator#processElement() {code:java} TriggerResult triggerResult = triggerContext.onElement(element); if (triggerResult.isFire()) { ACC contents = windowState.get(); if (contents == null) { continue; } emitWindowContents(window, contents); } if (triggerResult.isPurge()) { windowState.clear(); } {code} > Trigger on GlobalWindow does not clean state completely > ------------------------------------------------------- > > Key: FLINK-7731 > URL: https://issues.apache.org/jira/browse/FLINK-7731 > Project: Flink > Issue Type: Bug > Components: Core, DataStream API > Affects Versions: 1.3.2 > Reporter: Gerard Garcia > Priority: Minor > > I have an operator that consists of: > CoGroup Datastream -> GlobalWindow -> CustomTrigger -> Apply function > The custom trigger fires and purges the elements after it has received the expected number of elements (or when a timeout fires) from one of the streams and the apply function merges the elements with the ones received from the other stream. It appears that the state of the operator grows continuously so it seems it never gets completely cleaned. > There is a discussion in http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Clean-GlobalWidnow-state-td15613.html that suggests that it may be a bug. > This job reproduces the issue: https://github.com/GerardGarcia/flink-global-window-growing-state -- This message was sent by Atlassian JIRA (v6.4.14#64029)