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

Gary Helmling commented on HBASE-10162:
---------------------------------------

Hi Anoop,

This is definitely a complicating consideration.  I'm totally open to any 
better ways of structuring this.

In addition, I think it may be difficult for most coprocessor authors to 
clearly distinguish between write availability vs. read availability.  As you 
mentioned in HBASE-10148, one of the errors was failure to correctly initialize 
the next ordinal # to use for new label writes in postOpen() due to the missing 
(not yet replayed) log entries.  This may be a good example to consider.  How 
would the coprocessor handle incoming writes prior to the log replay completing 
and generating the correct next ordinal #?

That said, the intervening availability for writes is something coprocessor 
authors will have to deal with.  Maybe the initial proposal is too simplistic.  
How can we most clearly communicate to coprocessor implementors where they are 
in the initialization stages?

> Add RegionObserver lifecycle hook to be called when region is available
> -----------------------------------------------------------------------
>
>                 Key: HBASE-10162
>                 URL: https://issues.apache.org/jira/browse/HBASE-10162
>             Project: HBase
>          Issue Type: Improvement
>          Components: Coprocessors
>            Reporter: Gary Helmling
>
> Over in HBASE-10161 and HBASE-10148, there is discussion of the need to 
> modify existing coprocessors, which previously performed initialization only 
> in postOpen(), in order to account for the new log replay mechanism happening 
> post open.
> This points out that we have a hole in coprocessor lifecycle management which 
> caused the use of region lifecycle hooks (postOpen()) in the first place.
> Instead of requiring coprocessor authors to hook into region lifecycle 
> methods for initialization, we should provide an explicit lifecycle hook for 
> coprocessor authors to use when region open, log replay, and any future 
> requirements are complete, say initializeWhenAvailable() (open to better 
> names).



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Reply via email to