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 4025A200D34 for ; Fri, 3 Nov 2017 16:17:24 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 3EBE9160BFC; Fri, 3 Nov 2017 15:17:24 +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 5E64D160BE9 for ; Fri, 3 Nov 2017 16:17:23 +0100 (CET) Received: (qmail 61030 invoked by uid 500); 3 Nov 2017 15:17:22 -0000 Mailing-List: contact user-help@storm.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@storm.apache.org Delivered-To: mailing list user@storm.apache.org Received: (qmail 61021 invoked by uid 99); 3 Nov 2017 15:17:22 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Nov 2017 15:17:22 +0000 Received: from mail-pg0-f50.google.com (mail-pg0-f50.google.com [74.125.83.50]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id EB18C1A0117 for ; Fri, 3 Nov 2017 15:17:21 +0000 (UTC) Received: by mail-pg0-f50.google.com with SMTP id s75so2741570pgs.0 for ; Fri, 03 Nov 2017 08:17:21 -0700 (PDT) X-Gm-Message-State: AMCzsaXV2/8ZBWgwsP46LkgBykzZCIjNSuXx1U91bnW5lt+UwMTjmbdS hwq12X49RdSFvy6e/BIl2gyiv98cE6819lQy/Ac= X-Google-Smtp-Source: ABhQp+TcrMdU699QSNpJjjN2ErotlCLp3mN5doF/7KeKmegCqxM3H++7mrve4Q/UuZ6ih+XonFffWCniaL4tBOy3n0I= X-Received: by 10.98.147.197 with SMTP id r66mr8163633pfk.20.1509722241643; Fri, 03 Nov 2017 08:17:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.130.72 with HTTP; Fri, 3 Nov 2017 08:17:21 -0700 (PDT) In-Reply-To: References: From: =?UTF-8?Q?Stig_Rohde_D=C3=B8ssing?= Date: Fri, 3 Nov 2017 16:17:21 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Emitting tuples anchored to already-acked tuples To: user@storm.apache.org Content-Type: multipart/alternative; boundary="94eb2c0a243aec3b16055d1599aa" archived-at: Fri, 03 Nov 2017 15:17:24 -0000 --94eb2c0a243aec3b16055d1599aa Content-Type: text/plain; charset="UTF-8" Hi, It depends a bit on which order the acker bolt sees the messages. When bolt B acks the tuple, it sends a value to the acker bolt that essentially communicates "I'm done with tuple 123, and I didn't emit any new tuples anchored to it". Please read the section "How does Storm implement reliability in an efficient way" at https://storm.apache.org/releases/2.0.0-SNAPSHOT/Guaranteeing-message-processing.html for details. If the acker receives the ack from bolt B first, it will forward the ack to the spout and forget about the tuple tree. Any other messages for that tuple tree will effectively be ignored. If the acker receives the ack from bolt C first (let's say the ack from B was delayed for some reason), the tuple ack val won't match up to what the acker expects. The acker will essentially be receiving acks for tuples it doesn't know about. Since the acking mechanism is based on acking tuple ids with themselves to arrive at a value of 0 when the full tree is acked, this will prevent the tree from being acked. The tuple on the spout will time out and fail. In case the message from C is a fail, it will act like you expect and fail the tuple immediately on the spout. The bottom line is to avoid anchoring new tuples to acked tuples :) You might find https://github.com/apache/storm/blob/6207d320c3f79185f5e8e19458d73fbf1aa10f72/storm-client/src/jvm/org/apache/storm/daemon/Acker.java#L80 and https://github.com/apache/storm/blob/6207d320c3f79185f5e8e19458d73fbf1aa10f72/storm-client/src/jvm/org/apache/storm/executor/bolt/BoltOutputCollectorImpl.java#L79 interesting. 2017-11-03 14:27 GMT+01:00 Lawrence Craft : > Hi all, > > Out of curiosity, what happens if a bolt emits tuples anchored to spout > tuples that have already been acked? > > As an example: Spout A emits tuple with ID 123. Bolt B receives and > immediately acks tuple 123, but keeps it around in memory. At a later > point, something triggers Bolt B to emit a tuple anchored to the original > spout tuple 123. This new tuple is received by Bolt C. > > What happens if Bolt C fails this tuple? Or acks it? Will the spout > receive a duplicate ack (or an ack followed by a fail)? > > Thanks, > > Lawrence > --94eb2c0a243aec3b16055d1599aa Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

= It depends a bit on which order the acker bolt sees the messages.

When bolt B acks the tuple, it sends a value to the acker bolt that ess= entially communicates "I'm done with tuple 123, and I didn't e= mit any new tuples anchored to it". Please read the section "How = does Storm implement reliability in an efficient way" at https://storm.apache.org/releases/2.0.0-SNAPSHOT/Guaranteeing-mes= sage-processing.html for details.

If the acker receives th= e ack from bolt B first, it will forward the ack to the spout and forget ab= out the tuple tree. Any other messages for that tuple tree will effectively= be ignored.

If the acker receives the ack from bolt C first (= let's say the ack from B was delayed for some reason), the tuple ack va= l won't match up to what the acker expects. The acker will essentially = be receiving acks for tuples it doesn't know about. Since the acking me= chanism is based on acking tuple ids with themselves to arrive at a value o= f 0 when the full tree is acked, this will prevent the tree from being acke= d. The tuple on the spout will time out and fail. In case the message from = C is a fail, it will act like you expect and fail the tuple immediately on = the spout.

The bottom line is to avoid anchoring new tuples to= acked tuples :)

You might find https://github.com/apache/stor= m/blob/6207d320c3f79185f5e8e19458d73fbf1aa10f72/storm-client/src/jvm/org/ap= ache/storm/daemon/Acker.java#L80 and https://g= ithub.com/apache/storm/blob/6207d320c3f79185f5e8e19458d73fbf1aa10f72/storm-= client/src/jvm/org/apache/storm/executor/bolt/BoltOutputCollectorImpl.java#= L79 interesting.

2017-11-03 14:27 GMT+01:00 Lawrence Craft &= lt;lawrence.c= raft@gmail.com>:
Hi all,

Out of curiosity, what happens if a bol= t emits tuples anchored to spout tuples that have already been acked?
=

As an example: Spout A emits tuple with ID 123. Bolt B = receives and immediately acks tuple 123, but keeps it around in memory. At = a later point, something triggers Bolt B to emit a tuple anchored to the or= iginal spout tuple 123. This new tuple is received by Bolt C.
What happens if Bolt C fails this tuple? Or acks it? Will the s= pout receive a duplicate ack (or an ack followed by a fail)?

=
Thanks,

Lawrence

--94eb2c0a243aec3b16055d1599aa--