Skip to content

PHOENIX-8089 HighAvailabilityTestingUtility.createTableOnClusterPair keeps a stale connection - #2721

Merged
apurtell merged 1 commit into
apache:masterfrom
apurtell:PHOENIX-8089
Dec 5, 2026
Merged

apurtell merged 1 commit into
apache:masterfrom
apurtell:PHOENIX-8089

Conversation

@apurtell

@apurtell apurtell commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

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

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

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

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

@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)

@apurtell
apurtell merged commit 676cd2a into apache:master Dec 5, 2026
10 of 13 checks passed
@apurtell
apurtell deleted the PHOENIX-8089 branch December 5, 2026 19:08
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>
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