phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoffrey Jacoby (JIRA)" <>
Subject [jira] [Created] (PHOENIX-5248) Allow MULTI_TENANT to use any PK column
Date Thu, 18 Apr 2019 15:24:00 GMT
Geoffrey Jacoby created PHOENIX-5248:

             Summary: Allow MULTI_TENANT to use any PK column
                 Key: PHOENIX-5248
             Project: Phoenix
          Issue Type: Improvement
            Reporter: Geoffrey Jacoby
            Assignee: Geoffrey Jacoby

Phoenix's multi-tenancy support is incredibly useful, because it allows systems to give users
connections that transparently filter a multi-tenant environment to return only their data.
However, it's only supported for the leading column of the PK and has to be manually enabled

One common use case I've encountered is a multi-tenant table whose keyspace is fully covered
by disjoint views, with the views all filtering on enumerations of the same PK column -- let's
call it ViewId.  The most natural way to represent that is by a PK of <ViewId, TenantId,
...> which would allow fast lookups by tenant connections AND fast cross-tenant queries
by admin processes. However, multi-tenancy requires the key be <TenantId, ViewId> which
is only fast for the tenant connections, not global processes. It would be great if I could
set a property on the table, MULTI_TENANT_COLUMN = "TenantId", and column was used for auto-filtering

This message was sent by Atlassian JIRA

View raw message