[
https://issues.apache.org/jira/browse/HBASE-30554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18148190#comment-18148190
]
Hudson commented on HBASE-30554:
--------------------------------
Results for branch master
[build #227 on
builds.a.o|https://ci-hbase.apache.org/job/HBase-Integration-Test/job/master/227/]:
(/) *{color:green}+1 overall{color}*
----
details (if available):
(/) {color:green}+1 client integration test for 3.3.5 {color}
(/) {color:green}+1 client integration test for 3.3.5 with shaded hadoop
client{color}
(/) {color:green}+1 client integration test for 3.3.6 {color}
(/) {color:green}+1 client integration test for 3.3.6 with shaded hadoop
client{color}
(/) {color:green}+1 client integration test for 3.4.0 {color}
(/) {color:green}+1 client integration test for 3.4.0 with shaded hadoop
client{color}
(/) {color:green}+1 client integration test for 3.4.1 {color}
(/) {color:green}+1 client integration test for 3.4.1 with shaded hadoop
client{color}
(/) {color:green}+1 client integration test for 3.4.2 {color}
(/) {color:green}+1 client integration test for 3.4.2 with shaded hadoop
client{color}
(/) {color:green}+1 client integration test for 3.4.3 {color}
(/) {color:green}+1 client integration test for 3.4.3 with shaded hadoop
client{color}
> Concurrent HbckChore invocations can trigger redundant sequential scans
> -----------------------------------------------------------------------
>
> Key: HBASE-30554
> URL: https://issues.apache.org/jira/browse/HBASE-30554
> Project: HBase
> Issue Type: Bug
> Reporter: Honda Yasuhisa
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.0.0-alpha-1, 2.7.0, 3.1.0, 3.0.1, 2.6.8, 2.5.17
>
>
> Currently, {{HbckChore.runChore()}} checks whether the chore is running
> before calling the {{chore()}} method. However, the check and the assignment
> of {{running = true}} are not atomic.
> {code:java}
> public boolean runChore() {
> // This function does the sanity checks of making sure the chore is not
> run when it is
> // disabled or when it's already running. It returns whether the chore
> was actually run or not.
> if (isDisabled() || isRunning()) {
> if (isDisabled()) {
> LOG.warn("hbck chore is disabled! Set " + HBCK_CHORE_INTERVAL + " > 0
> to enable it.");
> } else {
> LOG.warn("hbck chore already running. Can't run till it finishes.");
> }
> return false;
> }
> chore();
> return true;
> } {code}
> ref:
> [https://github.com/apache/hbase/blob/23ffbcca7c589758d1ea83a1035a7d451a215ce3/hbase-server/src/main/java/org/apache/hadoop/hbase/master/hbck/HbckChore.java#L122]
>
> {code:java}
> @Override
> protected synchronized void chore() {
> if (isDisabled() || isRunning()) {
> LOG.warn("hbckChore is either disabled or is already running. Can't run
> the chore");
> return;
> }
> running = true;
> :{code}
> ref:
> [https://github.com/apache/hbase/blob/23ffbcca7c589758d1ea83a1035a7d451a215ce3/hbase-server/src/main/java/org/apache/hadoop/hbase/master/hbck/HbckChore.java#L92]
>
> Multiple threads can pass the check before any of them set running to
> {{{}true{}}}. While synchronization prevents concurrent execution of
> HbckChore, it doesn't prevent redundant sequential scans. A competing callers
> block until the current scan finishes.
> Concurrent requests should be rejected (return false) instead of blocking
> until current scan finishes and then starting another scan.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)