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

Ashu Pachauri commented on HBASE-16036:
---------------------------------------

I had a quick look at the code. Most things look fine to me but I only have two 
little concerns:
1. "hbase.replication.queues.createtable.workers": Why do you need more than 
one thread to create the replication table?
2. The current behavior is that regionservers would block on replication table 
to become available, which means we can't too any real work if replication is 
not initialized. If this is the case, you need not write a separate executor to 
deal with this and you can use createTableProcedure to bypass the 
checkInitialized check. See TableNamespaceManager#createNamespaceTable. The 
current approach also works similarly, so, I am not too particular about it.

> Fix ReplicationTableBase initialization to make it non-blocking
> ---------------------------------------------------------------
>
>                 Key: HBASE-16036
>                 URL: https://issues.apache.org/jira/browse/HBASE-16036
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Replication
>            Reporter: Joseph
>            Assignee: Joseph
>         Attachments: HBASE-16036.patch
>
>
> Currently there is a bug inside of TableBasedReplicationQueuesImpl 
> construction that prevents ReplicationServices from starting before Master is 
> initialized. So currently each of the RS, including HMaster, with Replication 
> enabled will attempt to create the ReplicationTable on initialization. 
> Currently HMaster's initialization: serviceThreads.start() -> new 
> TableBasedReplicationQueuesImpl() -> Replication Table Creation -> HMaster 
> sets initialized flags.
> But this fails when we try to create the Replication Table as the 
> HMaster.checkInitialized() flag fails. This ends up blocking HMaster 
> initialization and results in a deadlock.
> So in this patch, I will create the Replication Table in the background of 
> TableBasedReplicationQueuesImpl and only block when we actually call methods 
> that access it.
> This also requires a small refactoring of ReplicationSourceManager.init() so 
> that we run the abandoned queue adoption in the background
> Review board at: https://reviews.apache.org/r/48763/



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

Reply via email to