[
https://issues.apache.org/jira/browse/HBASE-30554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18148789#comment-18148789
]
Hudson commented on HBASE-30554:
--------------------------------
Results for branch branch-2.5
[build #897 on
builds.a.o|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.5/897/]:
(x) *{color:red}-1 overall{color}*
----
details (if available):
(/) {color:green}+1 general checks{color}
-- For more information [see general
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.5/897/General_20Nightly_20Build_20Report/]
(x) {color:red}-1 jdk8 hadoop2 checks{color}
-- For more information [see jdk8 (hadoop2)
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.5/897/JDK8_20Nightly_20Build_20Report_20_28Hadoop2_29/]
(x) {color:red}-1 jdk8 hadoop3 checks{color}
-- For more information [see jdk8 (hadoop3)
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.5/897/JDK8_20Nightly_20Build_20Report_20_28Hadoop3_29/]
(x) {color:red}-1 jdk11 hadoop3 checks{color}
-- For more information [see jdk11
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.5/897/JDK11_20Nightly_20Build_20Report_20_28Hadoop3_29/]
(x) {color:red}-1 jdk17 hadoop3 checks{color}
-- For more information [see jdk17
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-2.5/897/JDK17_20Nightly_20Build_20Report_20_28Hadoop3_29/]
> 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)