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

Rajeshbabu Chintaguntla edited comment on PHOENIX-5794 at 3/24/20, 11:28 AM:
-----------------------------------------------------------------------------

[~RichardAntal] 
- you are trying to check the threshold after creating index before building 
index why don't we check the same just before creating index itself so that we 
can avoid creating the index and dropping the index unnecessarily.
- And you can get the guide posts if the threshold is greater than zero only. 
{noformat}
+                String family = 
indexedColumn.getName().getString().split(":")[0];
+                if (!columnFamilies.contains(family) && family.length() > 0){
{noformat}
Instead of getting the column families from the index table there is already 
data table object reference from that you can directly get the column families 
in order.
PTable#getColumnFamilies
- Even to read the guide posts you can you can use the 
ConnectionQueryServices#getTableStats so if it's already available then chances 
that the stats might read from cache ifself.


was (Author: rajeshbabu):
[~RichardAntal] you are trying to check the threshold after creating index 
before building index why don't we check the same just before creating index 
itself so that we can avoid creating the index and dropping the index 
unnecessarily.

> Create a threshold for non async index creation, that can be modified in 
> configs
> --------------------------------------------------------------------------------
>
>                 Key: PHOENIX-5794
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5794
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: Richard Antal
>            Assignee: Richard Antal
>            Priority: Major
>         Attachments: PHOENIX-5794.master.v1.patch, 
> PHOENIX-5794.master.v2.patch
>
>
> Issue:
> When user try to create an index on a huge phoenix table the region servers 
> crashed which led to multiple regions going in RIT state. 
>  
> Solution:
> If the expected byte read size is higher than the limit we raise an exception 
> to notify the user that the index should be created asynchronously.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to