Skip to content

HBASE-30248 Validate snapshot region timeout#8468

Open
Sigma-Ma wants to merge 3 commits into
apache:masterfrom
Sigma-Ma:HBASE-30248-snapshot-region-timeout
Open

HBASE-30248 Validate snapshot region timeout#8468
Sigma-Ma wants to merge 3 commits into
apache:masterfrom
Sigma-Ma:HBASE-30248-snapshot-region-timeout

Conversation

@Sigma-Ma

@Sigma-Ma Sigma-Ma commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

JIRA: https://issues.apache.org/jira/browse/HBASE-30248

What changes were proposed in this pull request?

This change validates hbase.snapshot.region.timeout in RegionServerSnapshotManager.

When the configured value is less than or equal to zero, HBase logs a warning and falls back to the documented default value of 300000 milliseconds.

All RegionServer snapshot call sites now use the same validated timeout value. The configuration documentation is also updated to state that the value must be greater than zero.

Why are the changes needed?

HBASE-30248 reports that a negative hbase.snapshot.region.timeout is passed to ThreadPoolExecutor as the keep-alive time during snapshot procedure initialization.

This causes an IllegalArgumentException and aborts the RegionServer during startup. A zero value is also invalid when core thread timeout is enabled.

Falling back to the documented default prevents an invalid timeout configuration from aborting the RegionServer.

How was this patch tested?

Added TestRegionServerSnapshotManager, covering:

  • A negative value falls back to the default.
  • Zero falls back to the default.
  • A positive value is preserved.

The focused unit test can be run with:

mvn -pl hbase-server -am -DskipITs -Dtest=TestRegionServerSnapshotManager test

@Sigma-Ma

Copy link
Copy Markdown
Contributor Author

Hi maintainers, the three GitHub Actions workflows for this fork PR are awaiting approval. This PR does not modify any workflow files.

Could someone with write access approve them when convenient? Thanks.

@Sigma-Ma

Copy link
Copy Markdown
Contributor Author

Hi @guluo2016, sorry for the direct ping. Could you please help approve the fork workflows for this PR, or suggest an appropriate reviewer, when convenient? The original reproducer has been verified successfully. Thank you!

@Sigma-Ma

Copy link
Copy Markdown
Contributor Author

Hi @guluo2016, I pushed a small follow-up commit to fix the Spotless formatting failure. The three workflows are awaiting approval again. Could you please approve them when convenient? Thanks!

@Sigma-Ma

Copy link
Copy Markdown
Contributor Author

Hi @Apache9, sorry for the direct ping. All CI checks are now green, and the reporter has verified the original reproducer with both negative and zero timeout values.
Could you please review this small RegionServer snapshot fix when convenient, and merge it into master if it looks good?
The same unvalidated timeout reads are also present on branch-3, branch-2, branch-2.6, and branch-2.5. I would be happy to prepare separate backport PRs for the branches the maintainers consider appropriate. Please let me know which branches you prefer.
One JIRA bookkeeping note: HBASE-30248 is currently marked as Resolved with Fix Version 2.5.14, which has already been released. The status and Fix Versions may need to be updated to reflect the branches that actually receive the patch.
Thanks!

Comment thread hbase-common/src/main/resources/hbase-default.xml
@guluo2016
guluo2016 self-requested a review July 22, 2026 10:34

@guluo2016 guluo2016 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants