You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Rahul Shrivastava (JIRA)" <ji...@apache.org> on 2017/08/29 18:58:00 UTC

[jira] [Comment Edited] (PHOENIX-4138) Create a hard limit on number of indexes per table

    [ https://issues.apache.org/jira/browse/PHOENIX-4138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16145898#comment-16145898 ] 

Rahul Shrivastava edited comment on PHOENIX-4138 at 8/29/17 6:57 PM:
---------------------------------------------------------------------

Andrew,
We can use a config to control this feature and have default for them. 
In FAT client, if the client does not have the config setup, the default is could be a specific number like 20 ( indexes per table). Otherwise they can provide their specified number for this config.

On thin client which talks to PQS, it is enforced at PQS level and again their is a default. 

So, there is never a case when client can bypass this check. 

Let me know if you still feel server side is better to enforce it. 


was (Author: rahulshrivastava):
 If we do this on server side, we need an valid SQL exception code for such a scenario . TOO_MANY_INDICES ? 

> Create a hard limit on number of indexes per table
> --------------------------------------------------
>
>                 Key: PHOENIX-4138
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4138
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Rahul Shrivastava
>            Assignee: Rahul Shrivastava
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> There should be a config parameter to impose a hard limit on number of indexes per table. There is a SQL Exception https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java#L260 , but it gets triggered on the server side  (https://github.com/apache/phoenix/blob/master/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java#L1589) . 
> We need a client side limit that can be configured via Phoenix config parameter. Something like if user create more than lets say 30 indexes per table, it would not allow more index creation for the that specific table. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)