From dev-return-45289-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Mon Mar 18 06:13:11 2019 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 A15EB180651 for ; Mon, 18 Mar 2019 07:13:10 +0100 (CET) Received: (qmail 86499 invoked by uid 500); 18 Mar 2019 06:13:09 -0000 Mailing-List: contact dev-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list dev@ignite.apache.org Received: (qmail 86478 invoked by uid 99); 18 Mar 2019 06:13:08 -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; Mon, 18 Mar 2019 06:13:08 +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 58994C0454 for ; Mon, 18 Mar 2019 06:13:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.153 X-Spam-Level: X-Spam-Status: No, score=0.153 tagged_above=-999 required=6.31 tests=[DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FROM_EXCESS_BASE64=0.105, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com 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 OMpUtp53Y2m6 for ; Mon, 18 Mar 2019 06:13:06 +0000 (UTC) Received: from mail-ot1-f49.google.com (mail-ot1-f49.google.com [209.85.210.49]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 7AF2E61144 for ; Mon, 18 Mar 2019 06:13:06 +0000 (UTC) Received: by mail-ot1-f49.google.com with SMTP id g1so13392996otj.11 for ; Sun, 17 Mar 2019 23:13:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=ay73TPR4mCM8R+KlwbPXd58AdFizLJnfVXDvgToSv3U=; b=lfWD7wB14QneeCJUSdwItrKEoI4CQ83BY6wJqV5SJ56g/ScbDK5MnwindAoyjUCuWL sI5njwh2F1KOo4CTY+e1ifd89c3PaqB0G7fTUoLrVO8FNbMAg7h9Dvrmzs03h2cMh71B Dn96dalMikRw/4uePunYmGhD0D2SXihfU16jhnQj2CF5MS343BU31sXJMTRjAaVjkLQS nbHCat8e4+W346xTH6u8kEoRfotbKf65zhW5JzL7Zo/uOnhXFpj8ijE0WSmJqly3hnwh BhhSc3NWK33xtNR9mj8VoNIDrXnhPNrZrh26HaiCdKddrV/S8gk+vC0qRpDPjL9Bep3J CLVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=ay73TPR4mCM8R+KlwbPXd58AdFizLJnfVXDvgToSv3U=; b=bvZHFdplCfXKJtWKuyRFkA+muFuV8adnO5sE5lBqM7kg2aLREtfQ/sEd0JGHP5zHeJ 4jlIbpSSiPJCINBfbb5BvDKpVhTwPDASMZ6UCU6JNcSQ22hO9A06vxzRPfwXpzvqW+OH 7nmuc7jwtTnYfypor7LoKCsgxkAdHre8F/4TNsjlomFvmFjDaCLIp2eFgm+AvY0GTVWD xhF1r+D3THcCQKXDI0mRAwfhU5oyl2uyNbyJVpHAkhYrfMxKiO6Da4gNQV4EdlMDpd3U 2aeHkynGnR/V0BZJ2ImIITRyZyWIChrtZXB1ICUn1uHOmuN4Qr0d29e9pg3Cgrj+VoJU M3Og== X-Gm-Message-State: APjAAAWhDM2wU2w0O4O+sV35rlHCXinRS0mWK3j5pLv256bXxZM6eX/d OC5CFfNlof/3namJs2xncNERvw5mVBPBtfNCiEHV5wn4 X-Google-Smtp-Source: APXvYqz14OLWIkItEtwPf3k7EPD+lqPJmy/nozzm1tplZzKqH6dcoUCMt9YzNBTZFjZ6OIquZOq5ygxm3CPUPrvORZs= X-Received: by 2002:a9d:309:: with SMTP id 9mr228404otv.230.1552889585031; Sun, 17 Mar 2019 23:13:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?B?0J/QsNCy0LvRg9GF0LjQvSDQmNCy0LDQvQ==?= Date: Mon, 18 Mar 2019 09:12:58 +0300 Message-ID: Subject: Re: DeadLocked while calling .Net ThinClient PutAll ? To: dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, When you are working with TRANSACTIONAL cache you should be aware that deadlocks might happen. I see the following options to prevent deadlocks to happen: 1. Explicitly order all keys involved in any transaction using the same comparator. 2. Use OPTIMISTIC transactions. Also, in many databases deadlocks can happen as well. So, instead of preventing deadlocks it is quite common to provide some means of breaking them. In Ignite it is possible to configure a transaction timeout. In that case deadlocked transaction will be aborted sooner or later and another transaction will be able to make a progress. > Should it be handle natively in Ignite Core, shouldn't it ? Unfortunately there is no general way to prevent deadlocks when using PutAll with unordered collection. Ignite does not enforce all keys to be Comparable which means that there could be keys without defined consistent order. And if we cannot order keys consistently then we can catch a deadlock. =D0=BF=D0=BD, 18 =D0=BC=D0=B0=D1=80. 2019 =D0=B3. =D0=B2 05:53, T=C3=A2m Ng= uy=E1=BB=85n M=E1=BA=A1nh : > > Hi Igniters, > > I heard that It could lead to DeadLocked when I pass non sorted collectio= n > into putAll method. Is it true ? > > From document i see that method requires a IEnumerable TV>> as input. I think pass a sorted collection into API is just a > workaround way. Should it be handle natively in Ignite Core, shouldn't it= ? > > How do you thing ? > > -- > Thanks & Best Regards > > Tam, Nguyen Manh --=20 Best regards, Ivan Pavlukhin