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 88C9E200D1B for ; Wed, 6 Sep 2017 15:31:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 876CA1609D0; Wed, 6 Sep 2017 13:31: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 CFA7B1609ED for ; Wed, 6 Sep 2017 15:31:05 +0200 (CEST) Received: (qmail 29088 invoked by uid 500); 6 Sep 2017 13:31: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 29078 invoked by uid 99); 6 Sep 2017 13:31:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Sep 2017 13:31:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 2FB18CC6FC for ; Wed, 6 Sep 2017 13:31:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-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-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id J8QLg-pn-mmF for ; Wed, 6 Sep 2017 13:31:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 6BCA85FC99 for ; Wed, 6 Sep 2017 13:31:03 +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 EFEC8E046B for ; Wed, 6 Sep 2017 13:31:02 +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 022B82416B for ; Wed, 6 Sep 2017 13:31:01 +0000 (UTC) Date: Wed, 6 Sep 2017 13:31:01 +0000 (UTC) From: "Andrew Mashenkov (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (IGNITE-6280) Cassandra ignores AffinityKeyMapped annotation in parent classes. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 06 Sep 2017 13:31:06 -0000 [ https://issues.apache.org/jira/browse/IGNITE-6280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrew Mashenkov updated IGNITE-6280: ------------------------------------- Fix Version/s: 2.3 > Cassandra ignores AffinityKeyMapped annotation in parent classes. > ----------------------------------------------------------------- > > Key: IGNITE-6280 > URL: https://issues.apache.org/jira/browse/IGNITE-6280 > Project: Ignite > Issue Type: Bug > Components: cassandra > Affects Versions: 2.1 > Reporter: Andrew Mashenkov > Fix For: 2.3 > > > By default, using @AffinityKeyMapped annotation force Ignire to override user _keyPersistence_ configuration that may cause confusing results. > PFA repro attached. > h3. Description > 1. Let there is 2 keys A and B that has same fields with one difference. Key A has affinity key in parent class. So, it looks like this. > {code} > class BaseKey { > @AffinityKeyMapped > Object affinityKey > } > {code} > {code} > class A extends BaseKey { > int id; > } > {code} > {code} > class B { > @AffinityKeyMapped > Object affinityKey; > int uid; > } > {code} > 2. Let we make different affinity mapping for Cassandra store, that looks like a valid case > {code:xml} > > > > > > .... > {code} > 3. We have different behavior for these similar cases that makes user confused. > For key A this will work fine and expected DDL will be generated. > For key B we'll get different DDL as Ignite will remove "_uid_" field from "_partitionKey_". > So, we should either to not allow Ignite to override key mapping or force Ignite to check if parent classes has @AffinityKeyMapped annotation. -- This message was sent by Atlassian JIRA (v6.4.14#64029)