Return-Path: X-Original-To: apmail-asterixdb-dev-archive@minotaur.apache.org Delivered-To: apmail-asterixdb-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 0A9E818F73 for ; Fri, 19 Feb 2016 07:55:17 +0000 (UTC) Received: (qmail 27298 invoked by uid 500); 19 Feb 2016 07:55:16 -0000 Delivered-To: apmail-asterixdb-dev-archive@asterixdb.apache.org Received: (qmail 27240 invoked by uid 500); 19 Feb 2016 07:55:16 -0000 Mailing-List: contact dev-help@asterixdb.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.incubator.apache.org Delivered-To: mailing list dev@asterixdb.incubator.apache.org Received: (qmail 27227 invoked by uid 99); 19 Feb 2016 07:55:16 -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, 19 Feb 2016 07:55:16 +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 229ED18051D for ; Fri, 19 Feb 2016 07:55:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.198 X-Spam-Level: * X-Spam-Status: No, score=1.198 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, 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 mx2-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 7ui_QHRNxzBP for ; Fri, 19 Feb 2016 07:55:14 +0000 (UTC) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id AC4E25F1E5 for ; Fri, 19 Feb 2016 07:55:13 +0000 (UTC) Received: by mail-pa0-f53.google.com with SMTP id fl4so46264860pad.0 for ; Thu, 18 Feb 2016 23:55:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:content-type:message-id:mime-version:subject:date :references:to:in-reply-to; bh=AwsBytlesNM9tHSDePzfrSan9lNm2xnpjzsCSodSnao=; b=0pnUbDAp3AfSsghB+rBWMSgiC2KIAm9lPflCP1xJ1mvZY7+8yCWMuTWBBerPaQlYKg Md8B2LwOlt2ecEt2IVX6P9TnoJVmwu73/WqrqdfnDOU5iEqbH0KvgedZ3EHHvcJ15d4i lysHhqaS46hkFXG/xE4o4JrhmO5FG6rK7MUVoGD+XYu6Rpe1isuO1jibDynoDBCATHUU XHsu5gh4s4MWhd4XMlcWauWjr7xk5/vxo1h6S+zVmNUPr2bIVs4O+4tEnFtzrry9Y0Y8 llG2RCNrkneSBM/72nm2IdHdcsSjm6EgKHA7bgFQIsUXtCN+ZQ55tMECpk9rey2btJ0S r14g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:content-type:message-id:mime-version :subject:date:references:to:in-reply-to; bh=AwsBytlesNM9tHSDePzfrSan9lNm2xnpjzsCSodSnao=; b=iCW7Nas4KvAyEuVuMlFt60/Kvm1TYQry6zn+A6FTqdQA9aXHqydiEwKswUPvKtiqHO 0TES4cubaJhhEaiHZRGWt5YGbv86pvxfC6SCaPzRui8XIZnxxbOWP+y8E3Y01gpwEMfy /Lx30msx3FTb6U4CU8cIVxMujZ3ZTyoKBxHwiy3eFWFfVePiHS3jMs+CjThcPYKQXLta 8xnyqcIzInN4vScQ0+Y60ncl+uNJWXP8gVFtD09DSFih01MdECRRUh66St/OG3iWYScA RgmpW4+YbyKXNVgRB0A1iNMl0mxdfjlhiW68vLjA0sg1u5+vTJON0DXyXFU1LKDul2ZK 1xsQ== X-Gm-Message-State: AG10YOSjqOH0V8mE83oDbYRtLoDn/K9bnEn9wDz325OPIrjyLPHdvRo7ZMvAaAN4sHMQMw== X-Received: by 10.67.12.175 with SMTP id er15mr16102905pad.70.1455868512751; Thu, 18 Feb 2016 23:55:12 -0800 (PST) Received: from [192.168.1.149] (66-215-226-0.dhcp.rvsd.ca.charter.com. [66.215.226.0]) by smtp.gmail.com with ESMTPSA id f12sm15390826pfd.87.2016.02.18.23.55.11 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 18 Feb 2016 23:55:11 -0800 (PST) Sender: Ildar Absalyamov From: Ildar Absalyamov Content-Type: multipart/alternative; boundary="Apple-Mail=_F07B9D24-2D4C-41AD-8998-C6BF3B2C6074" Message-Id: <12157248-5D28-4A03-9958-435855FF7BBF@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Subject: Re: Deadlock issue Date: Thu, 18 Feb 2016 23:55:10 -0800 References: To: dev@asterixdb.incubator.apache.org In-Reply-To: X-Mailer: Apple Mail (2.3112) --Apple-Mail=_F07B9D24-2D4C-41AD-8998-C6BF3B2C6074 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Abdullah, Do you think that issue is somehow related to the patch that you = proposed? https://issues.apache.org/jira/browse/ASTERIXDB-1302 = It does not involve duplicates per se, but has the same issue with feed = lock management. > On Jan 7, 2016, at 09:12, abdullah alamoudi = wrote: >=20 > So I have pushed the new change (Still under review). >=20 > @Vignesh, > This change has the fix for the twitter adapter. >=20 > @Jianfeng, > This change has the fix for the duplicate key issue. >=20 > It can be checked out using > git fetch https://asterix-gerrit.ics.uci.edu/asterixdb > refs/changes/74/574/2 && git checkout FETCH_HEAD >=20 > Amoudi, Abdullah. >=20 > On Thu, Jan 7, 2016 at 7:42 PM, abdullah alamoudi > wrote: >=20 >> Found the issue. It had nothing to do with any of the three = components. >>=20 >> The problem was that: >>> 1. we remove the tuple causing the exception. >> didn't work as I expected and instead it removed all the tuples upto = the >> offending record. >> I have fixed it and now it works like a charm. >>=20 >> Pushing the fix in a few minutes. >> Abdullah. >>=20 >> Amoudi, Abdullah. >>=20 >> On Thu, Jan 7, 2016 at 6:16 PM, Mike Carey wrote: >>=20 >>> The general transaction handling for such an exception wrt locking = and >>> aborts probably assumes that total bailouts are the answer. Thus, = it may >>> leave messes that rollbacks are otherwise the answer to. Feeds and >>> transactions don't mix super well, it seems.... Watching how = duplicate >>> keys work for insert from query statements may help you debug. If we >>> change >>> things to allow those to succeed for all non duplicate keys - which = might >>> make more sense for that anyway. >>> On Jan 7, 2016 5:48 AM, "abdullah alamoudi" = wrote: >>>=20 >>>> Today, as I was working on fixing handling of duplicate keys with = feeds, >>>> everything seemed to work fine. here is what we do when we = encounter a >>>> duplicate key exception. >>>>=20 >>>> 1. we remove the tuple causing the exception. >>>> 2. we continue from where we stopped. >>>>=20 >>>> The problem is that when I try to query the dataset after that to = check >>>> and see which records made it into the dataset, I get a deadlock. >>>>=20 >>>> I have looked at the stack trace (attached) and I think the threads = in >>> the >>>> file are the relevant ones. Please, have a look and let me know if = you >>> have >>>> a possible cause in mind. >>>>=20 >>>> The threads are related to: >>>> 1. BufferCache. >>>> 2. Logging. >>>> 3. Locking. >>>>=20 >>>> Let me know what you think. I can reproduce this bug. it happened = on >>> 100% >>>> of my test runs. >>>>=20 >>>> I will let you know when I solve it but it is taking longer than I >>> thought. >>>>=20 >>>> Amoudi, Abdullah. >>>>=20 >>>=20 >>=20 >>=20 Best regards, Ildar --Apple-Mail=_F07B9D24-2D4C-41AD-8998-C6BF3B2C6074--