You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Gabriel Reid (JIRA)" <ji...@apache.org> on 2014/03/16 08:20:46 UTC

[jira] [Resolved] (PHOENIX-245) Support declaring primary key columns as REVERSE to avoid hotspotting

     [ https://issues.apache.org/jira/browse/PHOENIX-245?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gabriel Reid resolved PHOENIX-245.
----------------------------------

    Resolution: Fixed

Bulk resolve of closed issues imported from GitHub. This status was reached by first re-opening all closed imported issues and then resolving them in bulk.

> Support declaring primary key columns as REVERSE to avoid hotspotting
> ---------------------------------------------------------------------
>
>                 Key: PHOENIX-245
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-245
>             Project: Phoenix
>          Issue Type: Task
>            Reporter: James Taylor
>            Assignee: aaraujo
>              Labels: enhancement, wontfix
>
> One technique to prevent write hot-spotting when you have a monotonically increasing key is to reverse the bits. This works well if you don't need to do a range scan across the values. One use case is when your first column represents a tenant ID in a multi tenant system.
> This would be implemented by building on the fix for [this issue](https://github.com/forcedotcom/phoenix/issues/58):
> 1. Add a new enum for REVERSE
> 2. Change the serialization/deserialization code in PDataType to reverse the bits in the case of REVERSE.
> 3. Disallow range scans on columns of type REVERSE. This could be caught in ExpressionCompiler_visitLeave(ComparisonParseNode,List<Expression>) and ExpressionCompiler_visitLeave(LikeParseNode,List<Expression>). These are the two cases I can think of that result in range scans.



--
This message was sent by Atlassian JIRA
(v6.2#6252)