From issues-return-98321-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Mon Sep 2 13:20:02 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 49E64180658 for ; Mon, 2 Sep 2019 15:20:02 +0200 (CEST) Received: (qmail 18076 invoked by uid 500); 2 Sep 2019 14:21:53 -0000 Mailing-List: contact issues-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 issues@ignite.apache.org Received: (qmail 18067 invoked by uid 99); 2 Sep 2019 14:21:53 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Sep 2019 14:21:53 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C336AE2FE3 for ; Mon, 2 Sep 2019 13:20:00 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 1496E7822C2 for ; Mon, 2 Sep 2019 13:20:00 +0000 (UTC) Date: Mon, 2 Sep 2019 13:20:00 +0000 (UTC) From: "Aleksey Plekhanov (Jira)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (IGNITE-11624) Discovery SPI: The client can handle events from the previous cluster after reconnect. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/IGNITE-11624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16920852#comment-16920852 ] Aleksey Plekhanov commented on IGNITE-11624: -------------------------------------------- [~NSAmelchev], I've looked at your patch and left a couple of comments in the upsource. > Discovery SPI: The client can handle events from the previous cluster after reconnect. > -------------------------------------------------------------------------------------- > > Key: IGNITE-11624 > URL: https://issues.apache.org/jira/browse/IGNITE-11624 > Project: Ignite > Issue Type: Bug > Reporter: Amelchev Nikita > Assignee: Amelchev Nikita > Priority: Major > Fix For: 2.8 > > Time Spent: 10m > Remaining Estimate: 0h > > Discovery has a queue for events. It's processed by event thread. If we hold up event processing using a listener on the client side and restarts cluster - the client will reconnect. After it reconnects it will continue processing events from the previous cluster. > This behavior produces bugs in MvccProcessor (IGNITE-11460) and [hanging of partitions exchange|https://github.com/NSAmelchev/ignite/pull/26/files] on the client side. The reason is that discovery notifies components about reconnection in the notifier thread by calling the 'onLocalJoin' method. After it (or at the same time), components can process events from the previous cluster in their listeners and break their logic. > The order of events is fine - after processing previous cluster events - it will process client disconnection/reconnection and new cluster events. > The possible solution is to fix discovery logic. Make a guarantee that no one event from the previous cluster will be processed after the client reconnect ('onLocalJoin' called). For example, wait for the client disconnect event will be processed in the discovery event thread. Then start attempt to reconnect. > [Dev-list discussion.|http://apache-ignite-developers.2346864.n4.nabble.com/The-client-can-handle-events-from-the-previous-cluster-after-reconnect-td41392.html] [Reproducer.|https://github.com/NSAmelchev/ignite/pull/26/files] -- This message was sent by Atlassian Jira (v8.3.2#803003)