[WIP] PHOENIX-7623: Add a profile which runs ITs with phoenix ha client#2508
Open
Divneet18 wants to merge 1 commit into
Open
[WIP] PHOENIX-7623: Add a profile which runs ITs with phoenix ha client#2508Divneet18 wants to merge 1 commit into
Divneet18 wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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.
What changes were proposed in this pull request?
This PR adds a Maven profile (ha-enabled) that allows existing integration tests to run through Phoenix HA client code paths (FailoverPhoenixConnection, ParallelPhoenixConnection) using a single HBase cluster. When activated with mvn test
-Pha-enabled, tests exercise the HA connection infrastructure without spinning up two physical clusters. The approach uses loopback aliases (localhost vs 127.0.0.1) for the ACTIVE and STANDBY cluster URLs — both resolve to the same cluster but
are distinct strings, satisfying the HA URL validation requirement.
Why are the changes needed?
The original PR #2205 converted 300+ integration tests to HA mode but was closed because it spun up 2 complete HBase clusters for every test, which was too resource-intensive. This PR achieves the same HA code coverage (testing
FailoverPhoenixConnection wrappers, HAGroupStoreRecord creation, HA URL handling, connection pooling with HA wrappers) while using only 1 physical cluster — reducing resource usage by 50%. CbrtFunctionEnd2EndIT is converted as
proof-of-concept, with the pattern ready to apply to additional tests.
Does this PR introduce any user-facing change?
No. All changes are to test infrastructure only. No production behavior is changed. The two production code changes (making HighAvailabilityGroup.close() public and ReadOnlyProps() constructor public) only affect visibility for test access.
How was this patch tested?
Was this patch authored or co-authored using generative AI tooling?
Yes. This patch was co-authored using Claude Code (Claude Opus 4.6/4.7). The AI assisted with investigating the root cause of connection timeout failures, identifying the loopback alias approach, implementing the fix, and debugging the
separate alias derivation for ZK and master configs.