[jira] [Updated] (HBASE-14201) hbck should not take a lock unless fixing errors
[ https://issues.apache.org/jira/browse/HBASE-14201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simon Law updated HBASE-14201: -- Release Note: HBCK no longer takes a lock until there are changes to the cluster being made. The old behavior can be achieved by passing the -exclusive flag. was: HBCK no longer takes a lock until there are changes to the cluster being made. The old behavior can be achieved by passing the exclusive flag. > hbck should not take a lock unless fixing errors > > > Key: HBASE-14201 > URL: https://issues.apache.org/jira/browse/HBASE-14201 > Project: HBase > Issue Type: Bug > Components: hbck, util >Affects Versions: 2.0.0, 1.3.0 >Reporter: Simon Law >Assignee: Simon Law > Fix For: 2.0.0, 1.2.0 > > Attachments: HBASE-14201-v0.patch, HBASE-14201-v1.patch > > > By default, hbck is run in a read-only checker mode. In this case, it is > sensible to let others run. By default, the balancer is left alone, > which may cause spurious errors, but cannot leave the balancer in a bad > state. It is dangerous to leave the balancer by accident, so it is only > ever enabled after fixing, it will never be forced off because of > racing. > When hbck is run in fixer mode, it must take an exclusive lock and > disable the balancer, or all havoc will break loose. > If you want to stop hbck from running in parallel, the -exclusive flag > will create the lock file. If you want to force -disableBalancer, that > option is available too. This makes more semantic sense than -noLock and > -noSwitchBalancer, respectively. > This task is related to HBASE-14092. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HBASE-14201) hbck should not take a lock unless fixing errors
[ https://issues.apache.org/jira/browse/HBASE-14201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14692665#comment-14692665 ] Simon Law commented on HBASE-14201: --- Er, I don't see the failing test. Is this because checkstyle is upset? > hbck should not take a lock unless fixing errors > > > Key: HBASE-14201 > URL: https://issues.apache.org/jira/browse/HBASE-14201 > Project: HBase > Issue Type: Bug > Components: hbck, util >Affects Versions: 2.0.0, 1.3.0 >Reporter: Simon Law >Assignee: Simon Law > Fix For: 2.0.0, 1.3.0 > > Attachments: HBASE-14201-v0.patch, HBASE-14201-v1.patch > > > By default, hbck is run in a read-only checker mode. In this case, it is > sensible to let others run. By default, the balancer is left alone, > which may cause spurious errors, but cannot leave the balancer in a bad > state. It is dangerous to leave the balancer by accident, so it is only > ever enabled after fixing, it will never be forced off because of > racing. > When hbck is run in fixer mode, it must take an exclusive lock and > disable the balancer, or all havoc will break loose. > If you want to stop hbck from running in parallel, the -exclusive flag > will create the lock file. If you want to force -disableBalancer, that > option is available too. This makes more semantic sense than -noLock and > -noSwitchBalancer, respectively. > This task is related to HBASE-14092. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14201) hbck should not take a lock unless fixing errors
[ https://issues.apache.org/jira/browse/HBASE-14201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simon Law updated HBASE-14201: -- Attachment: HBASE-14201-v1.patch Revised patch with fixed tests. > hbck should not take a lock unless fixing errors > > > Key: HBASE-14201 > URL: https://issues.apache.org/jira/browse/HBASE-14201 > Project: HBase > Issue Type: Bug > Components: hbck, util >Affects Versions: 2.0.0, 1.3.0 >Reporter: Simon Law >Assignee: Simon Law > Fix For: 2.0.0, 1.3.0 > > Attachments: HBASE-14201-v0.patch, HBASE-14201-v1.patch > > > By default, hbck is run in a read-only checker mode. In this case, it is > sensible to let others run. By default, the balancer is left alone, > which may cause spurious errors, but cannot leave the balancer in a bad > state. It is dangerous to leave the balancer by accident, so it is only > ever enabled after fixing, it will never be forced off because of > racing. > When hbck is run in fixer mode, it must take an exclusive lock and > disable the balancer, or all havoc will break loose. > If you want to stop hbck from running in parallel, the -exclusive flag > will create the lock file. If you want to force -disableBalancer, that > option is available too. This makes more semantic sense than -noLock and > -noSwitchBalancer, respectively. > This task is related to HBASE-14092. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HBASE-14201) hbck should not take a lock unless fixing errors
[ https://issues.apache.org/jira/browse/HBASE-14201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14692384#comment-14692384 ] Simon Law commented on HBASE-14201: --- Hmm, looks like it failed on parallel hbck testing, because exclusivity is no longer the default. Fixing the test. > hbck should not take a lock unless fixing errors > > > Key: HBASE-14201 > URL: https://issues.apache.org/jira/browse/HBASE-14201 > Project: HBase > Issue Type: Bug > Components: hbck, util >Affects Versions: 2.0.0, 1.3.0 >Reporter: Simon Law >Assignee: Simon Law > Fix For: 2.0.0, 1.3.0 > > Attachments: HBASE-14201-v0.patch > > > By default, hbck is run in a read-only checker mode. In this case, it is > sensible to let others run. By default, the balancer is left alone, > which may cause spurious errors, but cannot leave the balancer in a bad > state. It is dangerous to leave the balancer by accident, so it is only > ever enabled after fixing, it will never be forced off because of > racing. > When hbck is run in fixer mode, it must take an exclusive lock and > disable the balancer, or all havoc will break loose. > If you want to stop hbck from running in parallel, the -exclusive flag > will create the lock file. If you want to force -disableBalancer, that > option is available too. This makes more semantic sense than -noLock and > -noSwitchBalancer, respectively. > This task is related to HBASE-14092. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (HBASE-14092) hbck should run without locks by default and only disable the balancer when necessary
[ https://issues.apache.org/jira/browse/HBASE-14092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simon Law resolved HBASE-14092. --- Resolution: Fixed > hbck should run without locks by default and only disable the balancer when > necessary > - > > Key: HBASE-14092 > URL: https://issues.apache.org/jira/browse/HBASE-14092 > Project: HBase > Issue Type: Bug > Components: hbck, util >Affects Versions: 2.0.0, 1.3.0 >Reporter: Elliott Clark >Assignee: Elliott Clark > Fix For: 2.0.0, 1.2.0, 1.3.0 > > Attachments: HBASE-14092-v1.patch, HBASE-14092-v2.patch, > HBASE-14092.patch > > > HBCK is sometimes used as a way to check the health of the cluster. When > doing that it's not necessary to turn off the balancer. As such it's not > needed to lock other runs of hbck out. > We should add the --no-lock and --no-balancer command line flags. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HBASE-14092) hbck should run without locks by default and only disable the balancer when necessary
[ https://issues.apache.org/jira/browse/HBASE-14092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14680494#comment-14680494 ] Simon Law commented on HBASE-14092: --- Moved to HBASE-14201 as requested by [~eclark]. > hbck should run without locks by default and only disable the balancer when > necessary > - > > Key: HBASE-14092 > URL: https://issues.apache.org/jira/browse/HBASE-14092 > Project: HBase > Issue Type: Bug > Components: hbck, util >Affects Versions: 2.0.0, 1.3.0 >Reporter: Elliott Clark >Assignee: Elliott Clark > Fix For: 2.0.0, 1.2.0, 1.3.0 > > Attachments: HBASE-14092-v1.patch, HBASE-14092-v2.patch, > HBASE-14092.patch > > > HBCK is sometimes used as a way to check the health of the cluster. When > doing that it's not necessary to turn off the balancer. As such it's not > needed to lock other runs of hbck out. > We should add the --no-lock and --no-balancer command line flags. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14201) hbck should not take a lock unless fixing errors
[ https://issues.apache.org/jira/browse/HBASE-14201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simon Law updated HBASE-14201: -- Attachment: HBASE-14201-v0.patch > hbck should not take a lock unless fixing errors > > > Key: HBASE-14201 > URL: https://issues.apache.org/jira/browse/HBASE-14201 > Project: HBase > Issue Type: Bug > Components: hbck, util >Affects Versions: 2.0.0, 1.3.0 >Reporter: Simon Law > Fix For: 2.0.0, 1.2.0, 1.3.0 > > Attachments: HBASE-14201-v0.patch > > > By default, hbck is run in a read-only checker mode. In this case, it is > sensible to let others run. By default, the balancer is left alone, > which may cause spurious errors, but cannot leave the balancer in a bad > state. It is dangerous to leave the balancer by accident, so it is only > ever enabled after fixing, it will never be forced off because of > racing. > When hbck is run in fixer mode, it must take an exclusive lock and > disable the balancer, or all havoc will break loose. > If you want to stop hbck from running in parallel, the -exclusive flag > will create the lock file. If you want to force -disableBalancer, that > option is available too. This makes more semantic sense than -noLock and > -noSwitchBalancer, respectively. > This task is related to HBASE-14092. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (HBASE-14201) hbck should not take a lock unless fixing errors
Simon Law created HBASE-14201: - Summary: hbck should not take a lock unless fixing errors Key: HBASE-14201 URL: https://issues.apache.org/jira/browse/HBASE-14201 Project: HBase Issue Type: Bug Components: hbck, util Affects Versions: 2.0.0, 1.3.0 Reporter: Simon Law Fix For: 2.0.0, 1.2.0, 1.3.0 By default, hbck is run in a read-only checker mode. In this case, it is sensible to let others run. By default, the balancer is left alone, which may cause spurious errors, but cannot leave the balancer in a bad state. It is dangerous to leave the balancer by accident, so it is only ever enabled after fixing, it will never be forced off because of racing. When hbck is run in fixer mode, it must take an exclusive lock and disable the balancer, or all havoc will break loose. If you want to stop hbck from running in parallel, the -exclusive flag will create the lock file. If you want to force -disableBalancer, that option is available too. This makes more semantic sense than -noLock and -noSwitchBalancer, respectively. This task is related to HBASE-14092. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14092) hbck should run without locks by default and only disable the balancer when necessary
[ https://issues.apache.org/jira/browse/HBASE-14092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simon Law updated HBASE-14092: -- Summary: hbck should run without locks by default and only disable the balancer when necessary (was: Add -noLock and -noBalanceSwitch options to hbck) > hbck should run without locks by default and only disable the balancer when > necessary > - > > Key: HBASE-14092 > URL: https://issues.apache.org/jira/browse/HBASE-14092 > Project: HBase > Issue Type: Bug > Components: hbck, util >Affects Versions: 2.0.0, 1.3.0 >Reporter: Elliott Clark >Assignee: Elliott Clark > Fix For: 2.0.0, 1.2.0, 1.3.0 > > Attachments: HBASE-14092-v1.patch, HBASE-14092-v2.patch, > HBASE-14092.patch > > > HBCK is sometimes used as a way to check the health of the cluster. When > doing that it's not necessary to turn off the balancer. As such it's not > needed to lock other runs of hbck out. > We should add the --no-lock and --no-balancer command line flags. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (HBASE-14092) Add -noLock and -noBalanceSwitch options to hbck
[ https://issues.apache.org/jira/browse/HBASE-14092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simon Law updated HBASE-14092: -- Attachment: HBASE-14092-v2.patch By default, hbck is run in a read-only checker mode. In this case, it is sensible to let others run. By default, the balancer is left alone, which may cause spurious errors, but cannot leave the balancer in a bad state. It is dangerous to leave the balancer by accident, so it is only ever enabled after fixing, it will never be forced off because of racing. When hbck is run in fixer mode, it must take an exclusive lock and disable the balancer, or all havoc will break loose. If you want to stop hbck from running in parallel, the -exclusive flag will create the lock file. If you want to force -disableBalancer, that option is available too. This makes more semantic sense than -noLock and -noSwitchBalancer, respectively. > Add -noLock and -noBalanceSwitch options to hbck > > > Key: HBASE-14092 > URL: https://issues.apache.org/jira/browse/HBASE-14092 > Project: HBase > Issue Type: Bug > Components: hbck, util >Affects Versions: 2.0.0, 1.3.0 >Reporter: Elliott Clark >Assignee: Elliott Clark > Fix For: 2.0.0, 1.2.0, 1.3.0 > > Attachments: HBASE-14092-v1.patch, HBASE-14092-v2.patch, > HBASE-14092.patch > > > HBCK is sometimes used as a way to check the health of the cluster. When > doing that it's not necessary to turn off the balancer. As such it's not > needed to lock other runs of hbck out. > We should add the --no-lock and --no-balancer command line flags. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Reopened] (HBASE-14092) Add -noLock and -noBalanceSwitch options to hbck
[ https://issues.apache.org/jira/browse/HBASE-14092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Simon Law reopened HBASE-14092: --- I have two issues with the initial fix. The first is that the command line flags seem to be a bit backwards. I could probably live with bad defaults, but I think that being smart about when to use the hbase-hbck.lock file is much better. And also, semantic names rather than functional ones would probably make this clearer. But the real reason I'm submitting !HBASE-14092-v2.patch! is because of the race-condition when the balancer is re-enabled. That's not good at all, because it can accidentally leave the balancer disabled and we know how that can fall over if you don't notice. > Add -noLock and -noBalanceSwitch options to hbck > > > Key: HBASE-14092 > URL: https://issues.apache.org/jira/browse/HBASE-14092 > Project: HBase > Issue Type: Bug > Components: hbck, util >Affects Versions: 2.0.0, 1.3.0 >Reporter: Elliott Clark >Assignee: Elliott Clark > Fix For: 2.0.0, 1.2.0, 1.3.0 > > Attachments: HBASE-14092-v1.patch, HBASE-14092.patch > > > HBCK is sometimes used as a way to check the health of the cluster. When > doing that it's not necessary to turn off the balancer. As such it's not > needed to lock other runs of hbck out. > We should add the --no-lock and --no-balancer command line flags. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HBASE-14092) Add -noLock and -noBalanceSwitch options to hbck
[ https://issues.apache.org/jira/browse/HBASE-14092?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14648500#comment-14648500 ] Simon Law commented on HBASE-14092: --- Err, I commented on https://github.com/apache/hbase/commit/1446d01e98af2366c389676c25c74c4ce89a513a because I think -noBalanceSwitch can race. Also, these options might be a bit backwards. Really, we only need write locking. > Add -noLock and -noBalanceSwitch options to hbck > > > Key: HBASE-14092 > URL: https://issues.apache.org/jira/browse/HBASE-14092 > Project: HBase > Issue Type: Bug > Components: hbck, util >Affects Versions: 2.0.0, 1.3.0 >Reporter: Elliott Clark >Assignee: Elliott Clark > Fix For: 2.0.0, 1.2.0, 1.3.0 > > Attachments: HBASE-14092-v1.patch, HBASE-14092.patch > > > HBCK is sometimes used as a way to check the health of the cluster. When > doing that it's not necessary to turn off the balancer. As such it's not > needed to lock other runs of hbck out. > We should add the --no-lock and --no-balancer command line flags. -- This message was sent by Atlassian JIRA (v6.3.4#6332)