Return-Path: X-Original-To: apmail-gearpump-dev-archive@minotaur.apache.org Delivered-To: apmail-gearpump-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8250D19B62 for ; Fri, 15 Apr 2016 04:16:29 +0000 (UTC) Received: (qmail 37719 invoked by uid 500); 15 Apr 2016 04:16:29 -0000 Delivered-To: apmail-gearpump-dev-archive@gearpump.apache.org Received: (qmail 37683 invoked by uid 500); 15 Apr 2016 04:16:29 -0000 Mailing-List: contact dev-help@gearpump.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@gearpump.incubator.apache.org Delivered-To: mailing list dev@gearpump.incubator.apache.org Received: (qmail 37672 invoked by uid 99); 15 Apr 2016 04:16:29 -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; Fri, 15 Apr 2016 04:16:29 +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 C0C0A1A0302 for ; Fri, 15 Apr 2016 04:16:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.021 X-Spam-Level: X-Spam-Status: No, score=-4.021 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001] 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 BSkHnKNjinns for ; Fri, 15 Apr 2016 04:16:26 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 3C6F05F24D for ; Fri, 15 Apr 2016 04:16:26 +0000 (UTC) Received: (qmail 37056 invoked by uid 99); 15 Apr 2016 04:16:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Apr 2016 04:16:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 69D242C14F7 for ; Fri, 15 Apr 2016 04:16:25 +0000 (UTC) Date: Fri, 15 Apr 2016 04:16:25 +0000 (UTC) From: "Manu Zhang (JIRA)" To: dev@gearpump.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (GEARPUMP-32) Minimum clock of source Tasks maybe inaccurate MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/GEARPUMP-32?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Manu Zhang updated GEARPUMP-32: ------------------------------- Description: Moved from [https://github.com/gearpump/gearpump/issues/1835] and reported by [Zhu Yueqian|https://github.com/yueqianzhu] {quote} Source tasks have not any upstreamClocks. So, startClock is the minimum of pending clocks when recover happen. eg below: source task1: timeStamp:15,not ACK, minClockValue maybe is 15(<= 15). source task2: timeStamp:10,ACKed, minClockValue maybe is Long.MaxValue when recover happen,startClock maybe is 15. where is the data between 10 to 15 at task2? {quote} More context on this issue: In Gearpump, we maintain a global minimum clock tracked from a message's timestamp across all tasks. It means messages with timestamp before this clock have all been processed. An application will restart from this value on failure, and thus at-least-once message delivery could be guaranteed. The global minimum clock is the lower bound of all the Tasks' minimum clocks. For a task, the minimum clock is the lower of # upstream minimum clock # a. the minimum timestamp of unacked messages b. Long.MaxValue if all messages have been acked. Note that 2.b allows the global minimum clock to progress and it is almost safe since the clock is also bounded by the upstream minimum clock. I said "almost safe" because a source task has no upstream but we assume the upstream minimum clock is Long.MaxValue. Thus, the scenario described by Zhu Yueqian could happen and breaks at-least-once guarantee. was: Moved from [https://github.com/gearpump/gearpump/issues/1835] and reported by [Zhu Yueqian|https://github.com/yueqianzhu] {quote} Source tasks have not any upstreamClocks. So, startClock is the minimum of pending clocks when recover happen. eg below: source task1: timeStamp:15,not ACK, minClockValue maybe is 15(<= 15). source task2: timeStamp:10,ACKed, minClockValue maybe is Long.MaxValue when recover happen,startClock maybe is 15. where is the data between 10 to 15 at task2? {quote} More context on this issue: In Gearpump, we maintain a global minimum clock tracked from a message's timestamp across all tasks. It means messages with timestamp before this clock have all been processed. An application will restart from this value on failure, and thus at-least-once message delivery could be guaranteed. The global minimum clock is the lower bound of all the Tasks' minimum clocks. For a task, the minimum clock is the lower of 1. upstream minimum clock 2. a. the minimum timestamp of unacked messages b. Long.MaxValue if all messages have been acked. Note that 2.b allows the global minimum clock to progress and it is almost safe since the clock is also bounded by the upstream minimum clock. I said "almost safe" because a source task has no upstream but we assume the upstream minimum clock is Long.MaxValue. Thus, the scenario described by Zhu Yueqian could happen and breaks at-least-once guarantee. > Minimum clock of source Tasks maybe inaccurate > ---------------------------------------------- > > Key: GEARPUMP-32 > URL: https://issues.apache.org/jira/browse/GEARPUMP-32 > Project: Apache Gearpump > Issue Type: Bug > Components: streaming > Affects Versions: 0.8.0 > Reporter: Manu Zhang > Assignee: Manu Zhang > > Moved from [https://github.com/gearpump/gearpump/issues/1835] and reported by [Zhu Yueqian|https://github.com/yueqianzhu] > {quote} > Source tasks have not any upstreamClocks. So, startClock is the minimum of pending clocks when recover happen. > eg below: > source task1: timeStamp:15,not ACK, minClockValue maybe is 15(<= 15). > source task2: timeStamp:10,ACKed, minClockValue maybe is Long.MaxValue > when recover happen,startClock maybe is 15. where is the data between 10 to 15 at task2? > {quote} > More context on this issue: > In Gearpump, we maintain a global minimum clock tracked from a message's timestamp across all tasks. It means messages with timestamp before this clock have all been processed. An application will restart from this value on failure, and thus at-least-once message delivery could be guaranteed. > The global minimum clock is the lower bound of all the Tasks' minimum clocks. > For a task, the minimum clock is the lower of > # upstream minimum clock > # a. the minimum timestamp of unacked messages > b. Long.MaxValue if all messages have been acked. > > Note that 2.b allows the global minimum clock to progress and it is almost safe since the clock is also bounded by the upstream minimum clock. I said "almost safe" because a source task has no upstream but we assume the upstream minimum clock is Long.MaxValue. Thus, the scenario described by Zhu Yueqian could happen and breaks at-least-once guarantee. -- This message was sent by Atlassian JIRA (v6.3.4#6332)