[
https://issues.apache.org/jira/browse/HBASE-15406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15215698#comment-15215698
]
Heng Chen commented on HBASE-15406:
-----------------------------------
{quote}
Can we avoid having a key, and have only a simple boolean lock for the state?
{quote}
I have thought about this, in the first patch, because of Ephemeral Node we
used, so we could only create it in hbck during hbck running, that means
"lock" action and "change switch" action are separated between each other. So
we have to use the key to change the node after lock in hbck.
But now, in patch v1, we not use ephemeral node at all, that means we could
do lock action in master together with "change switch" action in one request.
But that means we will add some interfaces like "setSwitchWithLock" and
"releaseSwitchLock". And only hbck will call this methods.
All behaviors about switch in hbck will move to master, it looks like below in
master:
* create lock on zk
* change the state of switch and store the original state on zk
when we call releaseLock
* restore the original state
* delete lock
Let me try it, thanks [~mantonov] for your suggestion.
> 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)