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

Ankit Singhal commented on PHOENIX-3583:
----------------------------------------

bq. I don't think we need to prepare it on the server side as it might be out 
of sync with the client. 
I think we will have the similar behaviour with multiple clients also. 

Not sure above approach is the one we should go for but there are issues with 
current approach which we may want to address:-
1. Sending indexMaintainer along with each mutation. if we consider the average 
size of IndexMaintainers for a table as 2KB , this payload can slow the RPC and 
even sometimes could be more than the mutation size.
2. A batch of mutations in fly will not account a new index if created in 
between. The new index may go out of sync here. ( though transactional indexes 
is always more reliable).
3. For each batch, Sending index metadata separately in another RPC for each 
regionserver and caching it with expire time. It could be possible that the 
cache will not be available if region moves in between to a different 
regionserver or cache expire due to large batch size.






> Prepare IndexMaintainer on server itself
> ----------------------------------------
>
>                 Key: PHOENIX-3583
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3583
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Ankit Singhal
>            Assignee: Ankit Singhal
>         Attachments: PHOENIX-3583.patch
>
>
> -- reuse the cache of PTable and it's lifecycle.
> -- With the new implementation, we will be doing RPC to meta table per mini 
> batch which could be an overhead, but the same configuration 
> "updateCacheFrequency" can be used to control a frequency of touching 
> SYSTEM.CATALOG endpoint for updated Ptable or index maintainers. 
> -- It is expected that 99% of the time the table is old and RPC will be 
> returned with an empty result(so it may be less costly), as opposed to the 
> current implementation where we have to send the index maintainer payload to 
> each region server per upsert batch.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to