Repository navigation
PHOENIX-8117 Minicluster ITs abort the master when an injected clock runs ahead of the WAL roller - #2749
Open
apurtell wants to merge 1 commit into
Open
PHOENIX-8117 Minicluster ITs abort the master when an injected clock runs ahead of the WAL roller#2749apurtell wants to merge 1 commit into
apurtell wants to merge 1 commit into
Conversation
…runs ahead of the WAL roller Some ITs inject an EnvironmentEdge that runs many minutes ahead of the wall clock. In HBase 2.x, AbstractWALRoller checks for a periodic roll with the injected clock, but it records the last roll time with the wall clock. When the difference is more than the roll period, the roller rolls the WAL on each pass. The master local region has a roll period of 15 minutes, so TableTTLIT causes thousands of empty WAL rolls. The async WAL output stream times datanode acknowledgments with the injected clock. A clock jump during a write thus looks like a slow datanode. After three such events, the WAL excludes the only datanode of the mini cluster. The next WAL create has no target, and the HMaster aborts with "IOE in log roller". BaseTest.setUpConfigForMiniCluster now disables the periodic WAL roll for the region servers and for the master local region, and it disables the exclusion of slow datanodes. It sets these values after the default test configuration, because that configuration copies the HBase defaults. An override property for one of these keys has priority. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the test-only WAL configuration changes.
No open issues 🎉
What changed in this PR
Updates shared mini-cluster test configuration to prevent injected clock jumps from causing WAL failures and master aborts.
Changes:
- Disables periodic WAL rolling and slow-datanode exclusion by default in tests.
- Preserves explicit property overrides and size- or request-triggered WAL rolls.
| File | Description |
|---|---|
| phoenix-core/src/test/java/org/apache/phoenix/query/BaseTest.java | Adds test-only WAL defaults and a helper that preserves overrides. |
Review effort: Balanced
Contributor
Author
|
Precommit note: the failures in this run are not related to this change. Each one is a known problem on master.
(Claude Code) |
This was referenced Dec 4, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mini cluster tests that inject a clock far ahead of the wall clock can abort the master. Every later test in the class then fails.
Two HBase 2.x effects cause this. The WAL roller compares the injected clock with a last roll time from the wall clock. So it rolls the WAL on each pass. The async WAL also times datanode acknowledgments with the injected clock, so a clock jump looks like a slow datanode. After a few such events, the WAL excludes the only datanode and cannot create its next file. This change is test-only. The base test configuration now disables the periodic roll and the exclusion of slow datanodes. Size and requested rolls still occur. Override properties keep priority.
🤖 Generated with Claude Code