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

Geoffrey Jacoby commented on PHOENIX-5002:
------------------------------------------

I'd think you'd always want to _load_ the Indexer coprocessor because you 
wouldn't want to have to restart the region if someone created / activated an 
index later. (Adding a coproc is an alter and hence requires a region restart, 
right?) But agreed that if we have no mutable indexes on a table, the 
coprocessor hooks should no-op.

There's already a disabled flag in the Indexer which most operations seem to 
honor and early-exit, but it appears to only be set in a weird corner case in 
the start() method of the coproc if HBase fails some sort of method reflection. 
We could leverage this flag to use in the 0 index case. 

The tricky part would be the bookkeeping to maintain that flag, since an index 
can be created / activated on a table at any time, and the moment one goes 
live, the disabled flag would have to be off or we lose edits. 

 

 

> Don't load Indexer coprocessor for non-indexed tables
> -----------------------------------------------------
>
>                 Key: PHOENIX-5002
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5002
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.14.1
>            Reporter: Vincent Poon
>            Priority: Major
>
> It seems the Indexer coprocessor is loaded for tables even if they have no 
> indexes.
> There is some overhead such as write locking within Phoenix - we should 
> investigate whether we can avoid loading the Indexer coproc or disable it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to