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 7FFC02004F5 for ; Fri, 1 Sep 2017 17:40:05 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7E62216D430; Fri, 1 Sep 2017 15:40:05 +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 C4CAA16D427 for ; Fri, 1 Sep 2017 17:40:04 +0200 (CEST) Received: (qmail 87045 invoked by uid 500); 1 Sep 2017 15:40:02 -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 87027 invoked by uid 99); 1 Sep 2017 15:40:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Sep 2017 15:40:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id CC0F7C390C for ; Fri, 1 Sep 2017 15:40:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 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_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-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 (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id WDjr0TNgXD0j for ; Fri, 1 Sep 2017 15:39:58 +0000 (UTC) Received: from mail-qt0-f170.google.com (mail-qt0-f170.google.com [209.85.216.170]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id CF9665F5B8 for ; Fri, 1 Sep 2017 15:39:57 +0000 (UTC) Received: by mail-qt0-f170.google.com with SMTP id h15so2640609qta.4 for ; Fri, 01 Sep 2017 08:39:57 -0700 (PDT) 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=ZDo40mnt7juCeoLs7ZgS1VE4Sn0xo72E2Urn49hjPcs=; b=FTVXFOC/RtuvTWBsx0JnQNM5fqt/NAokInEmn5ZsmVab+kmocag39Ox3H1rGXc2hCZ 2EMam786Z8xlW4D6ffdscVsFszI1q49SKF9/wc9CIm3XnksGId+Z9YIQLVg+/YAzD8wu Tqf79FvYS1X+hs5u6KVwIF41D3W5c7oKM4ecGcm/jAn6vhX6YtGYScx6UMkpc86iaC9v w/YJwVw+Na5YpNfWdnlnUr4ErUqFis1UAyccFY5lxBecp5jb1qP3qftY3sHLTDf3PmZx +9Mg8HClyskbhY7OoAAQXZHWUFfK83/jPDXWOpsfWIZ4SkUuqJVz2LZSMPQZXzuq+yan AgEw== 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=ZDo40mnt7juCeoLs7ZgS1VE4Sn0xo72E2Urn49hjPcs=; b=UhhiW4zrV31f4lbvEWCV/l3UTdARCBN8l6HF0PXhV9vmqvofPMeUX2kvvznVJVanOk CdXQL9Bn1uD8Yb+KlXWlf+LHUQLnETCgqwPoIYkV9ryTw2BFLC0ELhSsTd6DqVc7BLRz 9lVdC7tJzPBl/yMXQc2pPi6h/caF+4ia+G9nk2sndxKx13384KyY7GyD/AHShp9dA5w0 2ZVTdDzKgioJUSpYn9fHWJUUcQIdGBHFYAsyghIMYTIxkkzRV5YnRGEIQZnr7ffFAauJ 7A93Wa/KF5j8dxIlaqn+5OhHtNPGN3ivj8OfXwCUr4WMxQ9CiGqyxmU13X8BY4JO6MNi ENmw== X-Gm-Message-State: AHPjjUhzihDTm0QU+0niyEFAcoSEqLPgLL5Q9Myu1g6+ERZ7rzZyKdTr zxtMD/eIRHOCdfLfqDXQi7hfjutHJQ== X-Google-Smtp-Source: ADKCNb4ldVOvIEu9Ni/LP/B1g+gPHt38KS9CPPS11Ei7ytWFW6GrTpamO90h5CsJndRMAtFe4l+/ZttsCdq7r0xWSpg= X-Received: by 10.200.54.204 with SMTP id b12mr3453740qtc.294.1504280390684; Fri, 01 Sep 2017 08:39:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.8.148 with HTTP; Fri, 1 Sep 2017 08:39:50 -0700 (PDT) In-Reply-To: References: From: Ilya Kasnacheev Date: Fri, 1 Sep 2017 18:39:50 +0300 Message-ID: Subject: Re: Hopeless looping in TcpCommunicationSpi To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary="001a11397df65453a805582292bb" archived-at: Fri, 01 Sep 2017 15:40:05 -0000 --001a11397df65453a805582292bb Content-Type: text/plain; charset="UTF-8" Yes, the same problem is possible with server-server communication. I've amended my pull request to include a test for that. There are already Thread.sleeps() in this look so I propose to add a countdown to maxConnectionAttempts instead of while(true) Ideally we should find a way to log last error, such issues are hard to debug otherwise. -- Ilya Kasnacheev 2017-09-01 15:27 GMT+03:00 Yakov Zhdanov : > Ilya, I reviewed your test and I now see the point. > > Is the same possible with server-server? Or failure process will be > initiated for remote node by local one? > > Will the following work for client? If connection fails then client takes a > pause for 1 sec with Thread.sleep() and takes another attempt. If > maxConnectionAttempts (3 by default) fails then client stops and restart > itself. > > --Yakov > --001a11397df65453a805582292bb--