Skip to content

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
apache:masterfrom
apurtell:PHOENIX-8117
Open

apurtell wants to merge 1 commit into
apache:masterfrom
apurtell:PHOENIX-8117

Conversation

@apurtell

@apurtell apurtell commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

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

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 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

@apurtell

apurtell commented Dec 4, 2026

Copy link
Copy Markdown
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)

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