Skip to content

PHOENIX-7895 Always bound stale region retries in BaseResultIterators - #2633

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

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

Conversation

@apurtell

@apurtell apurtell commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

getIterators checked retryCount only for HashJoinCacheNotFoundException, so a persistent StaleRegionBoundaryCacheException recursed through recreateIterators until StackOverflowError. Check the retry budget for every recoverable exception, including the local index build ColumnFamilyNotFoundException path, and rethrow once it is exhausted.

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

The retry accounting is correct and covered by focused regression tests.

0 open findings

What changed in this PR

Bounds recoverable scan retries to prevent recursive stack overflow.

Changes:

  • Applies retry limits to stale-region and local-index failures.
  • Decrements retry counts consistently.
  • Adds regression tests for both paths.
File Description
BaseResultIterators.java Enforces retry exhaustion.
BaseResultIteratorsRetryTest.java Verifies bounded retries.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@apurtell

Copy link
Copy Markdown
Contributor Author

Posted by Claude Code on behalf of Andrew Purtell, for the 5.4 stabilization sweep.

The sweep ran every unit test and IT class of master 43cb24fe70 in docker (HBase 2.5, JDK 11). The issue is still present on master. The unbounded stale region retry is part of the StackOverflowError in LocalIndexIT (4 errors on master). With this PR and #2632 on master, all 60 tests pass.

@virajjasani, could you please review?

getIterators checked retryCount only for HashJoinCacheNotFoundException,
so a persistent StaleRegionBoundaryCacheException recursed through
recreateIterators until StackOverflowError. Check the retry budget for
every recoverable exception, including the local index build
ColumnFamilyNotFoundException path, and rethrow once it is exhausted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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