Skip to content

[WIP] PHOENIX-7623: Add a profile which runs ITs with phoenix ha client#2508

Open
Divneet18 wants to merge 1 commit into
apache:PHOENIX-7623-featurefrom
Divneet18:PHOENIX-7623-feature-HA
Open

[WIP] PHOENIX-7623: Add a profile which runs ITs with phoenix ha client#2508
Divneet18 wants to merge 1 commit into
apache:PHOENIX-7623-featurefrom
Divneet18:PHOENIX-7623-feature-HA

Conversation

@Divneet18

@Divneet18 Divneet18 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

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?

  • mvn test -Dtest=CbrtFunctionEnd2EndIT -Pha-enabled -pl phoenix-core — passes (2 tests, 78s) with HA single-cluster mode
  • mvn test -Dtest=CbrtFunctionEnd2EndIT -pl phoenix-core — passes (2 tests, 54s) without HA, verifying backward compatibility
  • mvn test -Dtest=HAGroupStoreClientIT -pl phoenix-core — passes, verifying existing dual-cluster HA tests are unaffected
  • mvn clean install -DskipTests — full project builds successfully

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.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Divneet18 Divneet18 changed the title [WIP]PHOENIX-7623: Add a profile which runs ITs with phoenix ha client [WIP] PHOENIX-7623: Add a profile which runs ITs with phoenix ha client Jun 9, 2026
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.

1 participant