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

Hudson commented on HBASE-30554:
--------------------------------

Results for branch branch-2
        [build #131 on 
builds.a.o|https://ci-hbase.apache.org/job/HBase-Backwards-Compatibility-Test/job/branch-2/131/]:
 (/) *{color:green}+1 overall{color}*
----
Backwards compatibility checks:
(/) {color:green}+1 jdk17 hadoop 3.3.5 backward compatibility checks{color}
-- For more information [see jdk17 
report|https://ci-hbase.apache.org/job/HBase-Backwards-Compatibility-Test/job/branch-2/131/console]


(/) {color:green}+1 jdk17 hadoop 3.3.6 backward compatibility checks{color}
-- For more information [see jdk17 
report|https://ci-hbase.apache.org/job/HBase-Backwards-Compatibility-Test/job/branch-2/131/console]


(/) {color:green}+1 jdk17 hadoop 3.4.0 backward compatibility checks{color}
-- For more information [see jdk17 
report|https://ci-hbase.apache.org/job/HBase-Backwards-Compatibility-Test/job/branch-2/131/console]


(/) {color:green}+1 jdk17 hadoop 3.4.1 backward compatibility checks{color}
-- For more information [see jdk17 
report|https://ci-hbase.apache.org/job/HBase-Backwards-Compatibility-Test/job/branch-2/131/console]


(/) {color:green}+1 jdk17 hadoop 3.4.2 backward compatibility checks{color}
-- For more information [see jdk17 
report|https://ci-hbase.apache.org/job/HBase-Backwards-Compatibility-Test/job/branch-2/131/console]


> 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)

Reply via email to