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 8B148200CE7 for ; Thu, 17 Aug 2017 10:19:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8952016A7D3; Thu, 17 Aug 2017 08:19:09 +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 C94D216A7D1 for ; Thu, 17 Aug 2017 10:19:08 +0200 (CEST) Received: (qmail 32533 invoked by uid 500); 17 Aug 2017 08:19:07 -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 32514 invoked by uid 99); 17 Aug 2017 08:19:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Aug 2017 08:19:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id BC27AC008F for ; Thu, 17 Aug 2017 08:19:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id Sd5MxC6NdpYa for ; Thu, 17 Aug 2017 08:19:06 +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 8E3ED61127 for ; Thu, 17 Aug 2017 08:19:03 +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 B6B6BE0EB1 for ; Thu, 17 Aug 2017 08:19:01 +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 3BE5825389 for ; Thu, 17 Aug 2017 08:19:00 +0000 (UTC) Date: Thu, 17 Aug 2017 08:19:00 +0000 (UTC) From: "Stefan Richter (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-3089) State API Should Support Data Expiration (State TTL) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 17 Aug 2017 08:19:09 -0000 [ https://issues.apache.org/jira/browse/FLINK-3089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16130083#comment-16130083 ] Stefan Richter commented on FLINK-3089: --------------------------------------- [~sihuazhou] one thing that we would also need to discuss is what this means for checkpoints/savepoints when operating in event time. How do you want to solve the problem that results are no longer deterministic after recovery/resume? The current workaround (using the timer service) has clearly more overhead, but does not suffer from this problem. > State API Should Support Data Expiration (State TTL) > ---------------------------------------------------- > > Key: FLINK-3089 > URL: https://issues.apache.org/jira/browse/FLINK-3089 > Project: Flink > Issue Type: New Feature > Components: DataStream API, State Backends, Checkpointing > Reporter: Niels Basjes > > In some usecases (webanalytics) there is a need to have a state per visitor on a website (i.e. keyBy(sessionid) ). > At some point the visitor simply leaves and no longer creates new events (so a special 'end of session' event will not occur). > The only way to determine that a visitor has left is by choosing a timeout, like "After 30 minutes no events we consider the visitor 'gone'". > Only after this (chosen) timeout has expired should we discard this state. > In the Trigger part of Windows we can set a timer and close/discard this kind of information. But that introduces the buffering effect of the window (which in some scenarios is unwanted). > What I would like is to be able to set a timeout on a specific state which I can update afterwards. > This makes it possible to create a map function that assigns the right value and that discards the state automatically. -- This message was sent by Atlassian JIRA (v6.4.14#64029)