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 6F904200C2B for ; Thu, 2 Mar 2017 13:47:42 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 6E250160B6F; Thu, 2 Mar 2017 12:47:42 +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 E0D17160B61 for ; Thu, 2 Mar 2017 13:47:41 +0100 (CET) Received: (qmail 12941 invoked by uid 500); 2 Mar 2017 12:47:39 -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 12930 invoked by uid 99); 2 Mar 2017 12:47:39 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Mar 2017 12:47:39 +0000 Received: from mail-lf0-f52.google.com (mail-lf0-f52.google.com [209.85.215.52]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 2B65D1A002B for ; Thu, 2 Mar 2017 12:47:39 +0000 (UTC) Received: by mail-lf0-f52.google.com with SMTP id y193so33045061lfd.3 for ; Thu, 02 Mar 2017 04:47:39 -0800 (PST) X-Gm-Message-State: AMke39mJHVuXO6wN9rP1tlKXHDPvT4+ZM2iDvkb9UU0y4O56CMG8rvglMty7fK8Z0Zg75xY1GZzacJw8vdumBg== X-Received: by 10.25.151.196 with SMTP id z187mr4343760lfd.126.1488458857899; Thu, 02 Mar 2017 04:47:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.25.92.210 with HTTP; Thu, 2 Mar 2017 04:47:37 -0800 (PST) In-Reply-To: References: From: Andrey Gura Date: Thu, 2 Mar 2017 15:47:37 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: code refactoring suggestion To: dev@ignite.apache.org Content-Type: text/plain; charset=UTF-8 archived-at: Thu, 02 Mar 2017 12:47:42 -0000 Aleksey, if you talk about fut.listen() then it doesn't make sense. listen() call checks whether future is already completed and if it completed invokes passed listener from current thread. On Thu, Mar 2, 2017 at 12:42 PM, ALEKSEY KUZNETSOV wrote: > Hi all ! During pessimistic transaction we execute prepare phase at > org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal#commitAsync > after executing prepareAsync(); > We bind listener on prepare future. > Perhaps its better initially bind listener and then execute fut.prepare(); ? > -- > > *Best Regards,* > > *Kuznetsov Aleksey*