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

Heng Chen commented on HBASE-15406:
-----------------------------------

Currently there are two situations for switch changes
 * use command 'splitormerge_switch' 
 * run some tool like 'hbck'.

The second situation is a session, during the session,  we should protect the 
switch NOT be changed.
So in hbck,  it will create one lock with a random key before change switch,   
the lock will protect the switch NOT be changed.  Meanwhile,  the session which 
hold the key could change the switch state.
When the session (hbck) abort,   as my original thought,   master will do 
cleanup the resources left by this session.  
But as [~stack] suggestion,  i move the logic into hbck,   so we could rerun 
hbck to do cleanup.  
But it introduce another problem, because of the session has been aborted,  
when hbck restart we lost the key which could be used to pass the check before 
change switch.  
So the cleanup  in hbck has to ignore the key,  and it will cause conflicts 
when two hbck run at the same time.   
Maybe we could introduce a flag "shouldDoCleanup" to decrease the Probability 
of conflicts, but it could not avoid it.   

wdyt, guys?  I am stuck here.   [~stack] [~tedyu]



> Split / merge switch left disabled after early termination of hbck
> ------------------------------------------------------------------
>
>                 Key: HBASE-15406
>                 URL: https://issues.apache.org/jira/browse/HBASE-15406
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Priority: Critical
>             Fix For: 2.0.0, 1.3.0, 1.4.0
>
>         Attachments: HBASE-15406.patch, HBASE-15406.v1.patch, 
> HBASE-15406_v1.patch, test.patch, wip.patch
>
>
> This was what I did on cluster with 1.4.0-SNAPSHOT built Thursday:
> Run 'hbase hbck -disableSplitAndMerge' on gateway node of the cluster
> Terminate hbck early
> Enter hbase shell where I observed:
> {code}
> hbase(main):001:0> splitormerge_enabled 'SPLIT'
> false
> 0 row(s) in 0.3280 seconds
> hbase(main):002:0> splitormerge_enabled 'MERGE'
> false
> 0 row(s) in 0.0070 seconds
> {code}
> Expectation is that the split / merge switches should be restored to default 
> value after hbck exits.



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

Reply via email to