From issues-return-152957-archive-asf-public=cust-asf.ponee.io@flink.apache.org Thu Feb 15 09:34:11 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id F368B18067B for ; Thu, 15 Feb 2018 09:34:10 +0100 (CET) Received: (qmail 34475 invoked by uid 500); 15 Feb 2018 08:34: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 34185 invoked by uid 99); 15 Feb 2018 08:34:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Feb 2018 08:34:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 3FA2DC2AB7 for ; Thu, 15 Feb 2018 08:34:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.311 X-Spam-Level: X-Spam-Status: No, score=-110.311 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id CHcqzJtjcwa9 for ; Thu, 15 Feb 2018 08:34:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id A8D705F18B for ; Thu, 15 Feb 2018 08:34:02 +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 5AAE6E0332 for ; Thu, 15 Feb 2018 08:27: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 165C321E59 for ; Thu, 15 Feb 2018 08:27:00 +0000 (UTC) Date: Thu, 15 Feb 2018 08:27:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-8533) Support MasterTriggerRestoreHook state reinitialization MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLINK-8533?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1636= 5234#comment-16365234 ]=20 ASF GitHub Bot commented on FLINK-8533: --------------------------------------- Github user StephanEwen commented on the issue: https://github.com/apache/flink/pull/5427 =20 I think we are talking about two different things here: =20 1. We DO need a new method on the hook interface to reinitialize the = reader group. I think the one suggested by Eron works. 2. We DO NOT need a new method on the CheckpointCoordinator, but call= ing `Hook.initializeState()` within `CC.restoreLatestCheckpointedState()` (= whenever there is no checkpoint to be restored) should work. =20 =3D=3D> Let's add the Hook method, but not add an additional method to = the CheckpointCoordinator. > Support MasterTriggerRestoreHook state reinitialization > ------------------------------------------------------- > > Key: FLINK-8533 > URL: https://issues.apache.org/jira/browse/FLINK-8533 > Project: Flink > Issue Type: Bug > Components: State Backends, Checkpointing > Affects Versions: 1.3.0 > Reporter: Eron Wright=20 > Assignee: Eron Wright=20 > Priority: Major > > {{MasterTriggerRestoreHook}} enables coordination with an external system= for taking or restoring checkpoints. When execution is restarted from a ch= eckpoint, {{restoreCheckpoint}} is called to restore or reinitialize the ex= ternal system state. There's an edge case where the external state is not a= dequately reinitialized, that is when execution fails _before the first che= ckpoint_. In that case, the hook is not invoked and has no opportunity to r= estore the external state to initial conditions. > The impact is a loss of exactly-once semantics in this case. For example,= in the Pravega source function, the reader group state (e.g. stream positi= on data) is stored externally. In the normal restore case, the reader group= state is forcibly rewound to the checkpointed position. In the edge case w= here no checkpoint has yet been successful, the reader group state is not r= ewound and consequently some amount of stream data is not reprocessed. > A possible fix would be to introduce an {{initializeState}} method on the= hook interface. Similar to {{CheckpointedFunction::initializeState}}, this= method would be invoked unconditionally upon hook initialization. The Prav= ega=C2=A0hook=C2=A0would, for example, initialize or forcibly reinitialize = the reader group state.=C2=A0 =C2=A0=C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)