Return-Path: X-Original-To: apmail-phoenix-dev-archive@minotaur.apache.org Delivered-To: apmail-phoenix-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C84BE11B7E for ; Fri, 2 May 2014 04:58:47 +0000 (UTC) Received: (qmail 43831 invoked by uid 500); 2 May 2014 04:58:43 -0000 Delivered-To: apmail-phoenix-dev-archive@phoenix.apache.org Received: (qmail 43638 invoked by uid 500); 2 May 2014 04:58:39 -0000 Mailing-List: contact dev-help@phoenix.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.incubator.apache.org Delivered-To: mailing list dev@phoenix.incubator.apache.org Received: (qmail 43538 invoked by uid 99); 2 May 2014 04:58:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 May 2014 04:58:37 +0000 X-ASF-Spam-Status: No, hits=-2000.7 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 02 May 2014 04:58:36 +0000 Received: (qmail 39446 invoked by uid 99); 2 May 2014 04:58:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 May 2014 04:58:16 +0000 Date: Fri, 2 May 2014 04:58:16 +0000 (UTC) From: "James Taylor (JIRA)" To: dev@phoenix.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (PHOENIX-583) Base tenant table PK must lead with tenant_id and tenant_type_id columns MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/PHOENIX-583?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] James Taylor resolved PHOENIX-583. ---------------------------------- Resolution: Fixed Fix Version/s: 5.0.0 4.0.0 3.0.0 > Base tenant table PK must lead with tenant_id and tenant_type_id columns > ------------------------------------------------------------------------ > > Key: PHOENIX-583 > URL: https://issues.apache.org/jira/browse/PHOENIX-583 > Project: Phoenix > Issue Type: Task > Affects Versions: 3.0-Release > Reporter: elevine > Assignee: elevine > Fix For: 3.0.0, 4.0.0, 5.0.0 > > > From @jamestaylor: > One overall comment: we should formalize the link between the tenant-specific table name and the key prefix in the data row. Otherwise, often times a query will run over all "virtual" tables instead of just the data for the specific one. My proposal would be to: > * in addition the "base/parent table property" supplied at DDL time, require an additional "type id" property. It's possible, when we get support for sequences, that the server could generate this, but for now we could require it. This "type id" (i.e. the key prefix) would get cached in PTable so that the client will always have this value. > * data rows would be expected to conform to the following format: > * when you get to the issue about enforcing tenant_id visibility (i.e. adding tenant-id to the where clause), you'd also automatically add the key prefix to the where clause. You'd always be able to get the type-id, as it would be cached in the PTable which was looked up by name. > Related to tenant-specific table feature (issues -356 and -296). -- This message was sent by Atlassian JIRA (v6.2#6252)