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 0ED0F200D4E for ; Thu, 16 Nov 2017 16:47:06 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 0DA89160BE5; Thu, 16 Nov 2017 15:47:06 +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 2EFC0160BE6 for ; Thu, 16 Nov 2017 16:47:05 +0100 (CET) Received: (qmail 96157 invoked by uid 500); 16 Nov 2017 15:47:04 -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 96141 invoked by uid 99); 16 Nov 2017 15:47:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Nov 2017 15:47:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 92D081A1FEF for ; Thu, 16 Nov 2017 15:47:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 3k5rwGQXCS8E for ; Thu, 16 Nov 2017 15:47:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 206E75FCFB for ; Thu, 16 Nov 2017 15:47:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 5323DE0295 for ; Thu, 16 Nov 2017 15:47:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 15FE1240CE for ; Thu, 16 Nov 2017 15:47:00 +0000 (UTC) Date: Thu, 16 Nov 2017 15:47:00 +0000 (UTC) From: "Alexey Goncharuk (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (IGNITE-6939) Exclude false owners from the execution plan based on query response MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 16 Nov 2017 15:47:06 -0000 [ https://issues.apache.org/jira/browse/IGNITE-6939?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexey Goncharuk updated IGNITE-6939: ------------------------------------- Description: This is related to IGNITE-6858, the fix in the ticket can be improved. The scenario leading to the issue is as follows: 1) Node A has partition 1 as owning 2) Node B has local partition map which has partition 1 on node A as owning 3) Topology change is triggered which would move partition 1 from A to another node, topology version is X 4) A transaction is started on node B on topology X 5) Partition is rebalanced and node A moves partition 1 to RENTING and then to EVICTED state, node A updates it's local partition map. 6) A new topology change is triggered 7) Node A sends partition map (transitively) to the node B, but since there is a pending exchange, node B ignores the updated map and still thinks that A owns partition 1 [1] 8) transaction attempts to execute an SQL query against partition 1 on node A and retries infinitely [1] The related code is in GridDhtPartitionTopologyImpl#update(AffinityTopologyVersion, GridDhtPartitionFullMap, CachePartitionFullCountersMap, Set, AffinityTopologyVersion) {code} if (stopping || !lastTopChangeVer.initialized() || // Ignore message not-related to exchange if exchange is in progress. (exchangeVer == null && !lastTopChangeVer.equals(readyTopVer))) return false; {code} There are two possibilities to fix this: 1) Make all updates to partition map in a single thread, then we will not need update sequences and then we can update local partition map even when there is a pending exchange (this is a relatively big, but useful change) 2) Make a change in SQL query execution so that if a node cannot reserve a partition, do not map the partition to this node on the same topology version anymore (a quick fix) This will remove the need to throw an exception from SQL query inside transaction when there is a pending exchange. was: This is related to IGNITE-6858, the fix in the ticket can be improved. The scenario leading to the issue is as follows: 1) Node A has partition 1 as owning 2) Node B has local partition map which has partition 1 on node A as owning 3) Topology change is triggered which would move partition 1 from A to another node, topology version is X 4) A transaction is started on node B on topology X 5) Partition is rebalanced and node A moves partition 1 to RENTING and then to EVICTED state, node A updates it's local partition map. 6) A new topology change is triggered 7) Node A sends partition map (transitively) to the node B, but since there is a pending exchange, node B ignores the updated map and still thinks that A owns partition 1 [1] 8) transaction attempts to execute an SQL query against partition 1 on node A and retries infinitely [1] The related code is in GridDhtPartitionTopologyImpl#update(AffinityTopologyVersion, GridDhtPartitionFullMap, CachePartitionFullCountersMap, Set, AffinityTopologyVersion) {code} if (stopping || !lastTopChangeVer.initialized() || // Ignore message not-related to exchange if exchange is in progress. (exchangeVer == null && !lastTopChangeVer.equals(readyTopVer))) return false; {code} There are two possibilities to fix this: 1) Make all updates to partition map in a single thread, then we will not need update sequences and then we can update local partition map even when there is a pending exchange (this is a relatively big, but useful change) 2) Make a change in SQL query execution so that if a node cannot reserve a partition, do not map the partition to this node on the same topology version anymore (a quick fix) > Exclude false owners from the execution plan based on query response > -------------------------------------------------------------------- > > Key: IGNITE-6939 > URL: https://issues.apache.org/jira/browse/IGNITE-6939 > Project: Ignite > Issue Type: Task > Security Level: Public(Viewable by anyone) > Reporter: Alexey Goncharuk > > This is related to IGNITE-6858, the fix in the ticket can be improved. > The scenario leading to the issue is as follows: > 1) Node A has partition 1 as owning > 2) Node B has local partition map which has partition 1 on node A as owning > 3) Topology change is triggered which would move partition 1 from A to another node, topology version is X > 4) A transaction is started on node B on topology X > 5) Partition is rebalanced and node A moves partition 1 to RENTING and then to EVICTED state, node A updates it's local partition map. > 6) A new topology change is triggered > 7) Node A sends partition map (transitively) to the node B, but since there is a pending exchange, node B ignores the updated map and still thinks that A owns partition 1 [1] > 8) transaction attempts to execute an SQL query against partition 1 on node A and retries infinitely > [1] The related code is in GridDhtPartitionTopologyImpl#update(AffinityTopologyVersion, GridDhtPartitionFullMap, CachePartitionFullCountersMap, Set, AffinityTopologyVersion) > {code} > if (stopping || !lastTopChangeVer.initialized() || > // Ignore message not-related to exchange if exchange is in progress. > (exchangeVer == null && !lastTopChangeVer.equals(readyTopVer))) > return false; > {code} > There are two possibilities to fix this: > 1) Make all updates to partition map in a single thread, then we will not need update sequences and then we can update local partition map even when there is a pending exchange (this is a relatively big, but useful change) > 2) Make a change in SQL query execution so that if a node cannot reserve a partition, do not map the partition to this node on the same topology version anymore (a quick fix) > This will remove the need to throw an exception from SQL query inside transaction when there is a pending exchange. -- This message was sent by Atlassian JIRA (v6.4.14#64029)