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 01572200D42 for ; Fri, 17 Nov 2017 15:52:17 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0010E160BFB; Fri, 17 Nov 2017 14:52:17 +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 1EBE5160BF8 for ; Fri, 17 Nov 2017 15:52:15 +0100 (CET) Received: (qmail 68081 invoked by uid 500); 17 Nov 2017 14:52:15 -0000 Mailing-List: contact dev-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list dev@asterixdb.apache.org Received: (qmail 68068 invoked by uid 99); 17 Nov 2017 14:52:14 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Nov 2017 14:52:14 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 3183E180FA9 for ; Fri, 17 Nov 2017 14:52:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.901 X-Spam-Level: X-Spam-Status: No, score=-2.901 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 8PqcKSscG-TZ for ; Fri, 17 Nov 2017 14:52:12 +0000 (UTC) Received: from mail-pf0-f179.google.com (mail-pf0-f179.google.com [209.85.192.179]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id DDA6E60DBD for ; Fri, 17 Nov 2017 14:52:11 +0000 (UTC) Received: by mail-pf0-f179.google.com with SMTP id 17so2091631pfn.12 for ; Fri, 17 Nov 2017 06:52:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:date:references :to:in-reply-to:message-id; bh=foFb6Iiu6k+5QFLwazWICHbwVwaUYQPF5113R460HLg=; b=HEgZIC10qde25sduEI9aKftme/LkpNKw3Diux/E2G5hzRBoWuulhKiQv/B6N3RnLkW lOXhGfhhgjxwhLsJ8svntGfBjIxC2Yt1ZVJL3wde0Rp4u2kR4sJYGnIGzJL9YLARp8ja faay1+6deTg6uQgLpj5BCXUqj9T/y07cIS3Xf0IphgzXgqzHMQu1k31+J3tcPTyUMShV LtpqfmuQbOnqdfYXIx3aGSO3bk9wQ2WvDzxWIFDQTLkzWDcNMephtv0HGJjX++4ml95O FfABItJ4VDQIHWoICpvnicus4Gz28NNBJqzJ9j/GytbZlAa7Diz9Ogzf7TDRWdwe32sz Xgcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:date:references:to:in-reply-to:message-id; bh=foFb6Iiu6k+5QFLwazWICHbwVwaUYQPF5113R460HLg=; b=WPh8eotMWpQM3BzEhS+fSdOAEqyFp2t6MWrey55GcIWZPjda3vlGWTnEN43lRT1p0T 7AhGRhpK1fcCUAdRjfHRtKr+LMY+x5azoG3l8d+gIL373S9t97kemyg9i7luvt75VQ4y cEOHX3ZWhZ80lY9dXEi5cTP+wYDDNQNxN6bJ/OeB2NmXvR089uXAV07WedOpfixoR/Zn TyHF/AVQKxUf2K2KrnapGJ93eBgok4iHAzvS0HaPoYYHaZMgAwqcg3ArAP4+rzGh5CmS vOh/L6arfI9cAzg/cIasbEQbX5x4rPDxHCHUF+NC2rb1N2akRvsO9/W1j+FKoekW10KC vGdQ== X-Gm-Message-State: AJaThX6u4Xt3Z4m/HAa2ZYMDgRl4wy5U3/L4dxLo9wgeEqbj4ANYL/+0 3Mg7+pHl4yylIJCFsvC9o+ejnR1G X-Google-Smtp-Source: AGs4zMbRdtsx0MuV+uQa2VTdIy9IHZK7nZF0YVmIs8V4zg4w8Ceq+cyk0LqN8aMzZB09TWjbLnw0TQ== X-Received: by 10.99.64.5 with SMTP id n5mr5294559pga.244.1510930330247; Fri, 17 Nov 2017 06:52:10 -0800 (PST) Received: from [10.71.6.236] ([8.25.222.2]) by smtp.gmail.com with ESMTPSA id s25sm7651810pge.44.2017.11.17.06.52.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Nov 2017 06:52:09 -0800 (PST) From: abdullah alamoudi Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: MultiTransactionJobletEventListenerFactory Date: Fri, 17 Nov 2017 06:52:07 -0800 References: <7F92EF80-97A5-4B6F-BD8C-4C7514B96AD1@apache.org> To: dev@asterixdb.apache.org In-Reply-To: Message-Id: <132CEC8D-7221-49F6-A355-13431921770A@gmail.com> X-Mailer: Apple Mail (2.3273) archived-at: Fri, 17 Nov 2017 14:52:17 -0000 Can you illustrate how a deadlock can happen? I am anxious to know. Moreover, the reason for the multiple transaction ids in feeds is not = simply because we compile them differently. How would a commit operator know which dataset active operation counter = to decrement if they share the same id for example? > On Nov 16, 2017, at 9:46 PM, Xikui Wang wrote: >=20 > Yes. That deadlock could happen. Currently, we have one-to-one = mappings for > the jobs and transactions, except for the feeds. >=20 > @Abdullah, after some digging into the code, I think probably we can = use a > single transaction id for the job which feeds multiple datasets? See = if I > can convince you. :) >=20 > The reason we have multiple transaction ids in feeds is that we = compile > each connection job separately and combine them into a single feed = job. A > new transaction id is created and assigned to each connection job, = thus for > the combined job, we have to handle the different transactions as they > are embedded in the connection job specifications. But, what if we = create a > single transaction id for the combined job? That transaction id will = be > embedded into each connection so they can write logs freely, but the > transaction will be started and committed only once as there is only = one > feed job. In this way, we won't need = multiTransactionJobletEventListener > and the transaction id can be removed from the job specification = easily as > well (for Steven's change). >=20 > Best, > Xikui >=20 >=20 > On Thu, Nov 16, 2017 at 4:26 PM, Mike Carey wrote: >=20 >> I worry about deadlocks. The waits for graph may not understand that >> making t1 wait will also make t2 wait since they may share a thread - >> right? Or do we have jobs and transactions separately represented = there >> now? >>=20 >> On Nov 16, 2017 3:10 PM, "abdullah alamoudi" = wrote: >>=20 >>> We are using multiple transactions in a single job in case of feed = and I >>> think that this is the correct way. >>> Having a single job for a feed that feeds into multiple datasets is = a >> good >>> thing since job resources/feed resources are consolidated. >>>=20 >>> Here are some points: >>> - We can't use the same transaction id to feed multiple datasets. = The >> only >>> other option is to have multiple jobs each feeding a different = dataset. >>> - Having multiple jobs (in addition to the extra resources used, = memory >>> and CPU) would then forces us to either read data from external = sources >>> multiple times, parse records multiple times, etc >>> or having to have a synchronization between the different jobs and = the >>> feed source within asterixdb. IMO, this is far more complicated than >> having >>> multiple transactions within a single job and the cost far outweigh = the >>> benefits. >>>=20 >>> P.S, >>> We are also using this for bucket connections in Couchbase = Analytics. >>>=20 >>>> On Nov 16, 2017, at 2:57 PM, Till Westmann = wrote: >>>>=20 >>>> If there are a number of issue with supporting multiple transaction = ids >>>> and no clear benefits/use-cases, I=E2=80=99d vote for = simplification :) >>>> Also, code that=E2=80=99s not being used has a tendency to "rot" = and so I think >>>> that it=E2=80=99s usefulness might be limited by the time we=E2=80=99= d find a use for >>>> this functionality. >>>>=20 >>>> My 2c, >>>> Till >>>>=20 >>>> On 16 Nov 2017, at 13:57, Xikui Wang wrote: >>>>=20 >>>>> I'm separating the connections into different jobs in some of my >>>>> experiments... but that was intended to be used for the = experimental >>>>> settings (i.e., not for master now)... >>>>>=20 >>>>> I think the interesting question here is whether we want to allow = one >>>>> Hyracks job to carry multiple transactions. I personally think = that >>> should >>>>> be allowed as the transaction and job are two separate concepts, = but I >>>>> couldn't find such use cases other than the feeds. Does anyone = have a >>> good >>>>> example on this? >>>>>=20 >>>>> Another question is, if we do allow multiple transactions in a = single >>>>> Hyracks job, how do we enable commit runtime to obtain the correct = TXN >>> id >>>>> without having that embedded as part of the job specification. >>>>>=20 >>>>> Best, >>>>> Xikui >>>>>=20 >>>>> On Thu, Nov 16, 2017 at 1:01 PM, abdullah alamoudi < >> bamousaa@gmail.com> >>>>> wrote: >>>>>=20 >>>>>> I am curious as to how feed will work without this? >>>>>>=20 >>>>>> ~Abdullah. >>>>>>> On Nov 16, 2017, at 12:43 PM, Steven Jacobs >> wrote: >>>>>>>=20 >>>>>>> Hi all, >>>>>>> We currently have MultiTransactionJobletEventListenerFactory, = which >>>>>> allows >>>>>>> for one Hyracks job to run multiple Asterix transactions = together. >>>>>>>=20 >>>>>>> This class is only used by feeds, and feeds are in process of >>> changing to >>>>>>> no longer need this feature. As part of the work in = pre-deploying >> job >>>>>>> specifications to be used by multiple hyracks jobs, I've been >> working >>> on >>>>>>> removing the transaction id from the job specifications, as we = use a >>> new >>>>>>> transaction for each invocation of a deployed job. >>>>>>>=20 >>>>>>> There is currently no clear way to remove the transaction id = from >> the >>> job >>>>>>> spec and keep the option for MultiTransactionJobletEventLis >>> tenerFactory. >>>>>>>=20 >>>>>>> The question for the group is, do we see a need to maintain this >> class >>>>>> that >>>>>>> will no longer be used by any current code? Or, an other words, = is >>> there >>>>>> a >>>>>>> strong possibility that in the future we will want multiple >>> transactions >>>>>> to >>>>>>> share a single Hyracks job, meaning that it is worth figuring = out >> how >>> to >>>>>>> maintain this class? >>>>>>>=20 >>>>>>> Steven >>>>>>=20 >>>>>>=20 >>>=20 >>>=20 >>=20