[
https://issues.apache.org/jira/browse/HBASE-3210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022317#comment-13022317
]
Jean-Daniel Cryans commented on HBASE-3210:
-------------------------------------------
Comments after first pass:
- becomeActiveMaster and recoverableFromZKSessionExpiry needs complete javadoc
(the @return tag is empty)
- should recoverableFromZKSessionExpiry be called tryRecoveringExpiredSession?
- in recoverableFromZKSessionExpiry, you do a big if(becomeActiveMaster()) and
then return true, or false. What we usually prefer for readability is to
instead do something like:
{code}
if (!becomeActiveMaster()) {
return false;
}
// Initialize ZK based trackers since we now have a new ZK session.
initilizeZKBasedSystemTrackers();
// Update in-memory strutures to reflect our earlier Root/Meta assignment.
assignRootAndMeta();
// process RIT if any
this.assignmentManager.processRegionsInTransition();
return true;
{code}
- Instead of:
{code}
return recoverableFromZKSessionExpiry() ? false : true;
{code}
do
{code}
return !recoverableFromZKSessionExpiry();
{code}
- abortNow in abortNow() is set multiple times to true. Review how you use
that variable.
- There's a typo in initilizeZKBasedSystemTrackers
> HBASE-1921 for the new master
> -----------------------------
>
> Key: HBASE-3210
> URL: https://issues.apache.org/jira/browse/HBASE-3210
> Project: HBase
> Issue Type: Improvement
> Reporter: Jean-Daniel Cryans
> Priority: Critical
> Fix For: 0.92.0
>
> Attachments:
> HBASE-3210-When_the_Master_s_session_times_out_and_there_s_only_one,_cluster_is_wedged.patch,
>
> HBASE-3210-When_the_Master_s_session_times_out_and_there_s_only_one_cluster_is_wedged-2.patch
>
>
> HBASE-1921 was lost when writing the new master code. I guess it's going to
> be much harder to implement now, but I think it's a critical feature to have
> considering the reasons that brought me do it in the old master. There's
> already a test in TestZooKeeper which has been disabled a while ago.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira