Repository navigation
PHOENIX-8089 HighAvailabilityTestingUtility.createTableOnClusterPair keeps a stale connection - #2721
Merged
Merged
Conversation
…keeps a stale connection createTableOnClusterPair connects to each cluster with empty properties. The connection query services stay in the PhoenixDriver cache for the whole test class, also across cluster restarts. The HBase client keeps its cached master stub while a master answers on that host and port. When the other cluster of the pair restarts its master on the same port, later DDL goes to the wrong cluster. HighAvailabilityGroup2IT then failed in CREATE LOCAL INDEX with TableNotFoundException. Remove the connection query services from the driver cache after each cluster's DDL, so every call opens a new HBase connection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the test-only change addressing stale HBase connections after cluster restarts.
No open issues 🎉
What changed in this PR
This test-only change addresses stale HBase connections in high-availability test setup after cluster restarts.
Changes:
- Invalidates the driver’s cached query services after DDL on each cluster.
- Adds a comment explaining how reused master ports can send later DDL to the wrong cluster.
| File | Description |
|---|---|
| phoenix-core/src/it/java/org/apache/phoenix/jdbc/HighAvailabilityTestingUtility.java | Invalidates setup connections’ cached query services to prevent stale reuse. |
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) |
asf-gitbox-commits
pushed a commit
that referenced
this pull request
Dec 5, 2026
…keeps a stale connection (#2721) 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 5, 2026
…keeps a stale connection (#2721) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Andrew Purtell <apurtell@salesforce.com>
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.
A high availability test failed because a table was not found during a local index create in the cluster pair setup. The setup connects to each cluster with empty properties. The driver keeps those connection services through later cluster restarts. The HBase client also keeps its cached master stub while any master answers on that host and port. In the failed run, cluster A restarted with a new master port. The new master of cluster B then took the old port, so the table create went to cluster B and the Phoenix metadata went to cluster A.
The change makes the driver drop these connection services after the DDL on each cluster, so later calls open a new HBase connection. Callers use a different cache key, so their connections stay open. This is a test-only change.
🤖 Generated with Claude Code