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 420C3200C54 for ; Wed, 12 Apr 2017 13:37:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 40A16160B95; Wed, 12 Apr 2017 11:37:24 +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 8720E160B8A for ; Wed, 12 Apr 2017 13:37:23 +0200 (CEST) Received: (qmail 2316 invoked by uid 500); 12 Apr 2017 11:37:22 -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 2302 invoked by uid 99); 12 Apr 2017 11:37:21 -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; Wed, 12 Apr 2017 11:37:21 +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 2E263180A5A for ; Wed, 12 Apr 2017 11:37:21 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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: 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 AG8Ul2ma-feg for ; Wed, 12 Apr 2017 11:37:19 +0000 (UTC) Received: from mail-yb0-f173.google.com (mail-yb0-f173.google.com [209.85.213.173]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id B6D8B5FB5C for ; Wed, 12 Apr 2017 11:37:18 +0000 (UTC) Received: by mail-yb0-f173.google.com with SMTP id l201so5927631ybf.0 for ; Wed, 12 Apr 2017 04:37:18 -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=66QKEWA88bv6+B8QawIDo9H/znTRiHoJEKDJCjgaFpg=; b=hiV/DAcKvKa0tP8Vq36eXUCANjPaTK3IG2IadVMOu6q9i3lTltUmqpCMzc0kW3f++7 Zgu4mD9sF1gQDWcxyyeweukcxfob8Y5mHJF5k1zlWApnCq7A8QTRLcBshTJvPoIvew8Y aVDFrzsyL+ZpiUWUVte8hpAR9kM+r+h4zvUWDbCV75kz33tHmi8S3z4Td8uRWE5oWfm+ HOnTLZVseHdAJCAY230XG/rUXghYBaBMrMR8n+8TB8rrdruKJrEeFvCGSmHiVd5KPeC+ RdAHl64KlNU7hpstpgUZH1WRahbDUTX188lDURuAtnC19tdbfcgjJpZKwaByGzO81bqH uZqQ== 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=66QKEWA88bv6+B8QawIDo9H/znTRiHoJEKDJCjgaFpg=; b=C1XawCXLq6nUGVJJq3+dXIbVqLfAXiy+oJFFvwMcR55m86HbAF/LyFflbWzGiq3qJQ kwu8OL0DLydDA/6GsBC9cKfe0k2CMaWljm3R3gUhLNV+L7+B37mZb592tScUcdC1Y3pZ Nj4uJ34sLl/wK9KVC7SsQXq2xgDmAmlbd/9HYSeKI3APPG+jaCKZYybOD5RDOlGKjZUa ZLDcKW8rJt6Cu71ftB3wFntaSCID42E0+UGsIoC/yUydiyMOUSFGqHQ77Miu45YG+KGq Z+MJVuAaF+BZL5202RGwLzf5dcTur3MrEyCFidcXIjm6Hig08YmOsLl3JM6N+eVXpfmY BahA== X-Gm-Message-State: AN3rC/4m9QM1hTDwwSfqJaorlYO5Egjfo7ma7td+GFeDGg9KO0dqNzfWTiN0Yn6SsSn0jBDtf3pyYIfeY0jbeQ== X-Received: by 10.37.52.209 with SMTP id b200mr2058067yba.89.1491997038242; Wed, 12 Apr 2017 04:37:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.220.131 with HTTP; Wed, 12 Apr 2017 04:36:37 -0700 (PDT) In-Reply-To: References: From: Sergi Vladykin Date: Wed, 12 Apr 2017 14:36:37 +0300 Message-ID: Subject: Re: SQL on PARTITIONED vs REPLICATED cache To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary=001a1147ccba787305054cf6a1cf archived-at: Wed, 12 Apr 2017 11:37:24 -0000 --001a1147ccba787305054cf6a1cf Content-Type: text/plain; charset=UTF-8 Andrey, Because if you run query on replicated cache, but select data from a partitioned table, you will get only a part of the result. Igor, You are mostly right, but 1. Performance characteristics may change. 2. Ignite SQL processing pipeline may not support all the stuff in H2 SQL and fail in some case where it worked previously. Because of this the change may affect existing applications and I want to have it in 2.0 to make it legal. Sergi 2017-04-12 14:10 GMT+03:00 Igor Sapego : > Also, is it really a breaking change if the results are wrong? > To me it looks more like a bugfix, i.e. you can't break something > that does not work properly. > > Best Regards, > Igor > > On Wed, Apr 12, 2017 at 2:04 PM, Andrey Mashenkov < > andrey.mashenkov@gmail.com> wrote: > > > Sergi, > > > > How can query to replicated cache leads to to wrong results? > > Is it due to we can read backup entries? > > > > On Wed, Apr 12, 2017 at 12:31 PM, Sergi Vladykin < > sergi.vladykin@gmail.com > > > > > wrote: > > > > > Guys, > > > > > > I want to introduce another breaking change for 2.0. > > > > > > Currently SQL is being processed differently when we call method > `query` > > on > > > partitioned cache and on replicated: on replicated cache we do not do > any > > > extra processing and execute the query as is on current node. > > > > > > This behavior historically existed for performance reasons. But it is > not > > > obvious and leads to wrong query results. This issue becomes even more > > > creepy with JDBC and ODBC drivers. > > > > > > In 2.0 I want to execute all the SQL queries the same way through the > > whole > > > processing pipeline to guaranty the correct result irrespectively to > the > > > cache that was the query originator. > > > > > > To be able to have the old behavior (skip all the preprocessing and run > > > query on current node) add a flag isReplicatedOnly() on SqlQuery and > > > SqlFieldsQuery. It will be disabled by default and if one knows that > the > > > only replicated tables participate in a query, then he can enable it > for > > > better performance. > > > > > > Sergi > > > > > > > > > > > -- > > Best regards, > > Andrey V. Mashenkov > > > --001a1147ccba787305054cf6a1cf--