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 2D828200C0C for ; Mon, 30 Jan 2017 10:24:20 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 2BFCA160B4D; Mon, 30 Jan 2017 09:24:20 +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 760CE160B41 for ; Mon, 30 Jan 2017 10:24:19 +0100 (CET) Received: (qmail 86609 invoked by uid 500); 30 Jan 2017 09:24:18 -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 86597 invoked by uid 99); 30 Jan 2017 09:24:18 -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; Mon, 30 Jan 2017 09:24:18 +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 D15FA18586A for ; Mon, 30 Jan 2017 09:24:17 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.398 X-Spam-Level: ** X-Spam-Status: No, score=2.398 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_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SORBS_SPAM=0.5, 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 AW_wyOs1GdM0 for ; Mon, 30 Jan 2017 09:24:16 +0000 (UTC) Received: from mail-ua0-f175.google.com (mail-ua0-f175.google.com [209.85.217.175]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 3A36E5F4EE for ; Mon, 30 Jan 2017 09:24:16 +0000 (UTC) Received: by mail-ua0-f175.google.com with SMTP id 96so245607926uaq.3 for ; Mon, 30 Jan 2017 01:24:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=r81UvaYxXxBtefQbCBq5jcI6/ZH+cjuGfu6BCX6TihA=; b=tXYsHRUzCDCGgxQflAL5+T8Xdc5T/e0PgovhjrQ8bx0eXM1oGgB26rRqtHZ66xnR8m rPIKZvhY3ZOIJgnAYNp0Qikdo1AVAvMq3YSd4efZKdsNC4xlnRzFR9pUd0ktWWLv64vD +0uz15uSW9+iKmZslzu69Wy3i30K4U1jwR747qwEQ13dAyvTKVtiTAgIuVz+4zKMpDbA Po3eQDVIylb2cDYuZLD4ongtesTJIXLJ3MD5AspVzDz9P45aDIUxM2UzncDcP+kR5G5C D9LdeRsZOvmMwiXu7ji2kzMnlMUElCEvQu4X7dqEUReQ/kJ0d9N1MCY/M2YktFuZbpSe 2v2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=r81UvaYxXxBtefQbCBq5jcI6/ZH+cjuGfu6BCX6TihA=; b=mY/cZlfs0USm59d9z1bviLPr+fxuYmDM89fu60vSlSVo9pAIO11UUFIxz83xobmS+U Ih7Jp5xMhFRVOgqH7qhRfI6hsmBYkgH/7S8EZwhJqQ6XN18CpawNQ9TEZX4qrE4FBzOE Jt6JhAGDnFxHkPjGpRABzLXc7EkPb8H8QzDzXoKcrLjB6cAgwdhQoJhY/jcx+96xq6Yv jkwOFC7xH5Rujkt/4oC7VxNd+9vCVeGKZZxqRSI3XaFIewcxQ3X8pHjCd2FgYBa3vIqF gMCXe/XvJ5xQkKh7OOI09bmpQcs4UHNv8/zbJiHaqxRhldsiq3z5ASq70GSxEPSCtiqo 3anA== X-Gm-Message-State: AIkVDXL2hWMkR3Sdq4Afb0DRcl+zm/vWgDoipcEf4JmtBIvfMTW1YTioCXixsbB/ilAJfZpE+i7XCkcpifAgvQ== X-Received: by 10.176.81.97 with SMTP id f30mr10682235uaa.55.1485768254209; Mon, 30 Jan 2017 01:24:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.69.1 with HTTP; Mon, 30 Jan 2017 01:24:13 -0800 (PST) In-Reply-To: References: From: Alexey Goncharuk Date: Mon, 30 Jan 2017 12:24:13 +0300 Message-ID: Subject: Re: IGNITE-1948 ClusterTopologyCheckedException can return null for retryReadyFuture() To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary=94eb2c19122602c22905474c610a archived-at: Mon, 30 Jan 2017 09:24:20 -0000 --94eb2c19122602c22905474c610a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Alexander, Do you have a use-case in mind which results in IgniteTopologyException thrown from public API with retryFuture unset? retryFuture makes sense only for certain cache operations and may be set only in certain places in the code where we already know what to wait for. I do not see how you can initialize this future, for example, in GridCacheIoManager#sendNoRetry(ClusterNode node, GridCacheMessage msg, byt= e plc) --AG 2017-01-27 15:45 GMT+03:00 =D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4= =D1=80 =D0=9C=D0=B5=D0=BD=D1=8C=D1=88=D0=B8=D0=BA=D0=BE=D0=B2 : > I found a lot of using "ClusterTopologyCheckedException" exception. In > most > use-case these exceptions were just ignored. It's easier to see if > issue-4612 will be applied (I'm waiting for code review by my team leader= ) > where I renamed all unused exceptions in the "ignored". > > It means that in some case "retryReadyFuture" can left unset. But there a= re > code where exception is being getting from "get()" method in some "future= " > class and don't ignored (exception is sending to method > "GridFutureAdapter#onDone()" for example). > > So I decided not to do a deep global analysis of code and make some simpl= e > rules. > 1. If some method "X" throws ClusterTopologyCheckedException and ignores > it > (or converts to String, there are some variants to lose exception like > object) in all methods that call the method "X", then we can don't set > "retryReadyFuture" for optimization. But this should be clarified in > javadoc. > 2. But if exception escapes at least once like object: we must set > "retryReadyFuture" in that method. > > A few times when call tree was simple, I went deeper. > > So I found only three methods which can throw > "ClusterTopologyCheckedException" without setting "retryReadyFuture": > > 1. IgfsFragmentizerManager#sendWithRetries(UUID nodeId, > IgfsCommunicationMessage msg) > 2. GridCacheIoManager#sendNoRetry(ClusterNode node, GridCacheMessage msg, > byte plc) > 3. GridCacheIoManager#sendOrderedMessage(ClusterNode node, Object topic, > GridCacheMessage msg, byte plc, long timeout) > > In all other methods "ClusterTopologyCheckedException" escapes away too > far. > > What do you think about this approach to make compromise between > optimization and correctness? > --94eb2c19122602c22905474c610a--