Skip to content

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

Merged
apurtell merged 1 commit into
apache:masterfrom
apurtell:PHOENIX-7895
Dec 6, 2026
Merged

apurtell merged 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>
@apurtell

apurtell commented Dec 6, 2026

Copy link
Copy Markdown
Contributor Author

Friendly heads-up: I plan to merge this soon on my own prerogative, because it blocks #2725 (PHOENIX-8093, LocalIndexIT never runs) and I want to move that forward.

The failures in the latest precommit run are not related to this change, and each one has an open fix: the PhoenixTableLevelMetricsIT histogram check (#2446) and the test coverage duplicates (#2736).

🤖 Generated with Claude Code

@apurtell
apurtell merged commit 5bd4dfb into apache:master Dec 6, 2026
11 of 13 checks passed
@apurtell
apurtell deleted the PHOENIX-7895 branch December 6, 2026 05:53
asf-gitbox-commits pushed a commit that referenced this pull request Dec 6, 2026
…#2633)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Andrew Purtell <apurtell@salesforce.com>
asf-gitbox-commits pushed a commit that referenced this pull request Dec 6, 2026
…#2633)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Andrew Purtell <apurtell@salesforce.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