HBASE-29356 Incorrect split behavior when region information is missing
Description
We have identified a bug in the SimpleRegionNormalizer logic that leads to incorrect region splits when region size information is missing. If the size cannot be determined for one or more regions (e.g. due to unavailable metrics from RegionServers), the average region size calculation becomes incorrect. This results in a scenario where all regions may be considered too large and get split unintentionally.
Observed Behavior:
When region size data is not available (e.g., getRegionSizeMB() returns -1), the computed average size does not account for that, and regions with valid size may appear excessively large compared to the average — resulting in multiple unnecessary splits.
Expected Behavior:
If region size is unknown for some regions, those regions should be skipped during normalization. The average region size should be computed only from the regions for which the size is known. No region should be split or merged unless its size is known.
Patch:
Skips regions with unknown size from average size computation. Prevents split and merge operations on regions with unknown size. Adds unit tests for scenarios with partial or total absence of size data. Patch author: Milan Vymazal [email protected]
Tests:
testSplitOfLargeRegionIfOneIsNotKnow verifies correct behavior when one region has unknown size.
testSplitOfAllUnknownSize ensures that no split happens if size data is missing for all regions.
Reproduction:
Unfortunately, we are unable to reliably reproduce this bug in a live environment, since we cannot easily simulate the condition where RegionServer metrics are missing. However, we have confirmed the behavior through code analysis and the added unit tests.
:broken_heart: -1 overall
| Vote | Subsystem | Runtime | Logfile | Comment |
|---|---|---|---|---|
| +0 :ok: | reexec | 0m 34s | Docker mode activated. | |
| _ Prechecks _ | ||||
| +1 :green_heart: | dupname | 0m 0s | No case conflicting files found. | |
| +0 :ok: | codespell | 0m 0s | codespell was not available. | |
| +0 :ok: | detsecrets | 0m 0s | detect-secrets was not available. | |
| +1 :green_heart: | @author | 0m 0s | The patch does not contain any @author tags. | |
| +1 :green_heart: | hbaseanti | 0m 0s | Patch does not have any anti-patterns. | |
| _ master Compile Tests _ | ||||
| +1 :green_heart: | mvninstall | 3m 53s | master passed | |
| +1 :green_heart: | compile | 3m 32s | master passed | |
| +1 :green_heart: | checkstyle | 0m 45s | master passed | |
| +1 :green_heart: | spotbugs | 1m 58s | master passed | |
| +1 :green_heart: | spotless | 1m 1s | branch has no errors when running spotless:check. | |
| _ Patch Compile Tests _ | ||||
| +1 :green_heart: | mvninstall | 3m 36s | the patch passed | |
| +1 :green_heart: | compile | 4m 12s | the patch passed | |
| +1 :green_heart: | javac | 4m 12s | the patch passed | |
| +1 :green_heart: | blanks | 0m 0s | The patch has no blanks issues. | |
| -0 :warning: | checkstyle | 0m 48s | /results-checkstyle-hbase-server.txt | hbase-server: The patch generated 8 new + 0 unchanged - 0 fixed = 8 total (was 0) |
| +1 :green_heart: | spotbugs | 2m 16s | the patch passed | |
| +1 :green_heart: | hadoopcheck | 13m 48s | Patch does not cause any errors with Hadoop 3.3.6 3.4.0. | |
| -1 :x: | spotless | 0m 52s | patch has 65 errors when running spotless:check, run spotless:apply to fix. | |
| _ Other Tests _ | ||||
| +1 :green_heart: | asflicense | 0m 16s | The patch does not generate ASF License warnings. | |
| 46m 37s |
| Subsystem | Report/Notes |
|---|---|
| Docker | ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7035/1/artifact/yetus-general-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/7035 |
| Optional Tests | dupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless |
| uname | Linux 1e5a12103998 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 467bd83fb59976e61cee8301187122dfeffc0d2b |
| Default Java | Eclipse Adoptium-17.0.11+9 |
| spotless | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7035/1/artifact/yetus-general-check/output/patch-spotless.txt |
| Max. process+thread count | 84 (vs. ulimit of 30000) |
| modules | C: hbase-server U: hbase-server |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7035/1/console |
| versions | git=2.34.1 maven=3.9.8 spotbugs=4.7.3 |
| Powered by | Apache Yetus 0.15.0 https://yetus.apache.org |
This message was automatically generated.
:broken_heart: -1 overall
| Vote | Subsystem | Runtime | Logfile | Comment |
|---|---|---|---|---|
| +0 :ok: | reexec | 0m 27s | Docker mode activated. | |
| -0 :warning: | yetus | 0m 3s | Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck | |
| _ Prechecks _ | ||||
| _ master Compile Tests _ | ||||
| +1 :green_heart: | mvninstall | 3m 28s | master passed | |
| +1 :green_heart: | compile | 1m 4s | master passed | |
| +1 :green_heart: | javadoc | 0m 30s | master passed | |
| +1 :green_heart: | shadedjars | 6m 10s | branch has no errors when building our shaded downstream artifacts. | |
| _ Patch Compile Tests _ | ||||
| +1 :green_heart: | mvninstall | 3m 9s | the patch passed | |
| +1 :green_heart: | compile | 0m 58s | the patch passed | |
| +1 :green_heart: | javac | 0m 58s | the patch passed | |
| +1 :green_heart: | javadoc | 0m 26s | the patch passed | |
| +1 :green_heart: | shadedjars | 6m 3s | patch has no errors when building our shaded downstream artifacts. | |
| _ Other Tests _ | ||||
| -1 :x: | unit | 228m 32s | /patch-unit-hbase-server.txt | hbase-server in the patch failed. |
| 257m 50s |
| Subsystem | Report/Notes |
|---|---|
| Docker | ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7035/1/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/7035 |
| Optional Tests | javac javadoc unit compile shadedjars |
| uname | Linux 7063333ec79c 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 467bd83fb59976e61cee8301187122dfeffc0d2b |
| Default Java | Eclipse Adoptium-17.0.11+9 |
| Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7035/1/testReport/ |
| Max. process+thread count | 5920 (vs. ulimit of 30000) |
| modules | C: hbase-server U: hbase-server |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7035/1/console |
| versions | git=2.34.1 maven=3.9.8 |
| Powered by | Apache Yetus 0.15.0 https://yetus.apache.org |
This message was automatically generated.
:confetti_ball: +1 overall
| Vote | Subsystem | Runtime | Logfile | Comment |
|---|---|---|---|---|
| +0 :ok: | reexec | 0m 58s | Docker mode activated. | |
| _ Prechecks _ | ||||
| +1 :green_heart: | dupname | 0m 0s | No case conflicting files found. | |
| +0 :ok: | codespell | 0m 0s | codespell was not available. | |
| +0 :ok: | detsecrets | 0m 0s | detect-secrets was not available. | |
| +1 :green_heart: | @author | 0m 0s | The patch does not contain any @author tags. | |
| +1 :green_heart: | hbaseanti | 0m 0s | Patch does not have any anti-patterns. | |
| _ master Compile Tests _ | ||||
| +1 :green_heart: | mvninstall | 5m 9s | master passed | |
| +1 :green_heart: | compile | 4m 29s | master passed | |
| +1 :green_heart: | checkstyle | 0m 50s | master passed | |
| +1 :green_heart: | spotbugs | 2m 11s | master passed | |
| +1 :green_heart: | spotless | 1m 11s | branch has no errors when running spotless:check. | |
| _ Patch Compile Tests _ | ||||
| +1 :green_heart: | mvninstall | 5m 20s | the patch passed | |
| +1 :green_heart: | compile | 4m 38s | the patch passed | |
| +1 :green_heart: | javac | 4m 38s | the patch passed | |
| +1 :green_heart: | blanks | 0m 0s | The patch has no blanks issues. | |
| +1 :green_heart: | checkstyle | 0m 58s | the patch passed | |
| +1 :green_heart: | spotbugs | 3m 10s | the patch passed | |
| +1 :green_heart: | hadoopcheck | 18m 43s | Patch does not cause any errors with Hadoop 3.3.6 3.4.0. | |
| +1 :green_heart: | spotless | 1m 11s | patch has no errors when running spotless:check. | |
| _ Other Tests _ | ||||
| +1 :green_heart: | asflicense | 0m 16s | The patch does not generate ASF License warnings. | |
| 59m 0s |
| Subsystem | Report/Notes |
|---|---|
| Docker | ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7035/2/artifact/yetus-general-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/7035 |
| Optional Tests | dupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless |
| uname | Linux 66887f21fdb4 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 09e52d7f5ca5fb2d7752ad3656c50d881d69417d |
| Default Java | Eclipse Adoptium-17.0.11+9 |
| Max. process+thread count | 84 (vs. ulimit of 30000) |
| modules | C: hbase-server U: hbase-server |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7035/2/console |
| versions | git=2.34.1 maven=3.9.8 spotbugs=4.7.3 |
| Powered by | Apache Yetus 0.15.0 https://yetus.apache.org |
This message was automatically generated.
:broken_heart: -1 overall
| Vote | Subsystem | Runtime | Logfile | Comment |
|---|---|---|---|---|
| +0 :ok: | reexec | 0m 36s | Docker mode activated. | |
| -0 :warning: | yetus | 0m 3s | Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck | |
| _ Prechecks _ | ||||
| _ master Compile Tests _ | ||||
| +1 :green_heart: | mvninstall | 4m 29s | master passed | |
| +1 :green_heart: | compile | 1m 7s | master passed | |
| +1 :green_heart: | javadoc | 0m 35s | master passed | |
| +1 :green_heart: | shadedjars | 6m 58s | branch has no errors when building our shaded downstream artifacts. | |
| _ Patch Compile Tests _ | ||||
| +1 :green_heart: | mvninstall | 3m 56s | the patch passed | |
| +1 :green_heart: | compile | 1m 25s | the patch passed | |
| +1 :green_heart: | javac | 1m 25s | the patch passed | |
| +1 :green_heart: | javadoc | 0m 47s | the patch passed | |
| +1 :green_heart: | shadedjars | 6m 47s | patch has no errors when building our shaded downstream artifacts. | |
| _ Other Tests _ | ||||
| -1 :x: | unit | 309m 10s | /patch-unit-hbase-server.txt | hbase-server in the patch failed. |
| 341m 1s |
| Subsystem | Report/Notes |
|---|---|
| Docker | ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7035/2/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/7035 |
| Optional Tests | javac javadoc unit compile shadedjars |
| uname | Linux 243fcba9d83b 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / 09e52d7f5ca5fb2d7752ad3656c50d881d69417d |
| Default Java | Eclipse Adoptium-17.0.11+9 |
| Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7035/2/testReport/ |
| Max. process+thread count | 4412 (vs. ulimit of 30000) |
| modules | C: hbase-server U: hbase-server |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7035/2/console |
| versions | git=2.34.1 maven=3.9.8 |
| Powered by | Apache Yetus 0.15.0 https://yetus.apache.org |
This message was automatically generated.
Ping @ndimiduk.
Please take a look at this one?
Seems reasonable.
Heya @qqvpp thanks for the contribution. Can you please create for yourself a Jira account? We use Jira for project tracking.
https://selfserve.apache.org/
:confetti_ball: +1 overall
| Vote | Subsystem | Runtime | Logfile | Comment |
|---|---|---|---|---|
| +0 :ok: | reexec | 0m 43s | Docker mode activated. | |
| _ Prechecks _ | ||||
| +1 :green_heart: | dupname | 0m 0s | No case conflicting files found. | |
| +0 :ok: | codespell | 0m 0s | codespell was not available. | |
| +0 :ok: | detsecrets | 0m 0s | detect-secrets was not available. | |
| +1 :green_heart: | @author | 0m 0s | The patch does not contain any @author tags. | |
| +1 :green_heart: | hbaseanti | 0m 0s | Patch does not have any anti-patterns. | |
| _ master Compile Tests _ | ||||
| +1 :green_heart: | mvninstall | 5m 6s | master passed | |
| +1 :green_heart: | compile | 5m 1s | master passed | |
| +1 :green_heart: | checkstyle | 0m 48s | master passed | |
| +1 :green_heart: | spotbugs | 2m 20s | master passed | |
| +1 :green_heart: | spotless | 1m 6s | branch has no errors when running spotless:check. | |
| _ Patch Compile Tests _ | ||||
| +1 :green_heart: | mvninstall | 4m 31s | the patch passed | |
| +1 :green_heart: | compile | 4m 21s | the patch passed | |
| +1 :green_heart: | javac | 4m 21s | the patch passed | |
| +1 :green_heart: | blanks | 0m 0s | The patch has no blanks issues. | |
| +1 :green_heart: | checkstyle | 1m 0s | the patch passed | |
| +1 :green_heart: | spotbugs | 2m 30s | the patch passed | |
| +1 :green_heart: | hadoopcheck | 15m 51s | Patch does not cause any errors with Hadoop 3.3.6 3.4.0. | |
| +1 :green_heart: | spotless | 1m 7s | patch has no errors when running spotless:check. | |
| _ Other Tests _ | ||||
| +1 :green_heart: | asflicense | 0m 15s | The patch does not generate ASF License warnings. | |
| 55m 7s |
| Subsystem | Report/Notes |
|---|---|
| Docker | ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7035/3/artifact/yetus-general-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/7035 |
| Optional Tests | dupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless |
| uname | Linux 8d206b3bdead 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / b1dd4625137b6cb77fe397194b097bf58ac36c2d |
| Default Java | Eclipse Adoptium-17.0.11+9 |
| Max. process+thread count | 83 (vs. ulimit of 30000) |
| modules | C: hbase-server U: hbase-server |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7035/3/console |
| versions | git=2.34.1 maven=3.9.8 spotbugs=4.7.3 |
| Powered by | Apache Yetus 0.15.0 https://yetus.apache.org |
This message was automatically generated.
:confetti_ball: +1 overall
| Vote | Subsystem | Runtime | Logfile | Comment |
|---|---|---|---|---|
| +0 :ok: | reexec | 0m 28s | Docker mode activated. | |
| -0 :warning: | yetus | 0m 3s | Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck | |
| _ Prechecks _ | ||||
| _ master Compile Tests _ | ||||
| +1 :green_heart: | mvninstall | 3m 17s | master passed | |
| +1 :green_heart: | compile | 0m 59s | master passed | |
| +1 :green_heart: | javadoc | 0m 28s | master passed | |
| +1 :green_heart: | shadedjars | 6m 8s | branch has no errors when building our shaded downstream artifacts. | |
| _ Patch Compile Tests _ | ||||
| +1 :green_heart: | mvninstall | 3m 12s | the patch passed | |
| +1 :green_heart: | compile | 0m 58s | the patch passed | |
| +1 :green_heart: | javac | 0m 58s | the patch passed | |
| +1 :green_heart: | javadoc | 0m 27s | the patch passed | |
| +1 :green_heart: | shadedjars | 6m 2s | patch has no errors when building our shaded downstream artifacts. | |
| _ Other Tests _ | ||||
| +1 :green_heart: | unit | 211m 11s | hbase-server in the patch passed. | |
| 238m 1s |
| Subsystem | Report/Notes |
|---|---|
| Docker | ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7035/3/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile |
| GITHUB PR | https://github.com/apache/hbase/pull/7035 |
| Optional Tests | javac javadoc unit compile shadedjars |
| uname | Linux b462523c9ea5 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | dev-support/hbase-personality.sh |
| git revision | master / b1dd4625137b6cb77fe397194b097bf58ac36c2d |
| Default Java | Eclipse Adoptium-17.0.11+9 |
| Test Results | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7035/3/testReport/ |
| Max. process+thread count | 5374 (vs. ulimit of 30000) |
| modules | C: hbase-server U: hbase-server |
| Console output | https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7035/3/console |
| versions | git=2.34.1 maven=3.9.8 |
| Powered by | Apache Yetus 0.15.0 https://yetus.apache.org |
This message was automatically generated.