Skip to content

PHOENIX-8082 BackwardCompatibilityIT reuses a cached connection after a ZK port is reused - #2714

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

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

Conversation

@apurtell

@apurtell apurtell commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

The backward compatibility test failed in CI because the catalog table was not found. In that run, two mini clusters in the same fork got the same ZooKeeper client port. Each test starts a new mini cluster and builds the new client URL from its port. The driver caches connection services by URL, and test cleanup does not remove the entry. When a port repeats, the driver returns the services of a stopped cluster, so the first DDL fails.

The change adds a unique principal to the new client URL. The principal is part of the cache key, so each cluster gets its own connection services. A principal without a keytab does not start a Kerberos login. The old client URL does not change. This is a test-only change.

🤖 Generated with Claude Code

… a ZK port is reused

Each test starts a new mini cluster. When the new cluster gets the ZooKeeper
port of an earlier one, the new client URL maps to the cached connection of
the stopped cluster, and the test fails. Add a unique principal to the URL,
so each cluster gets its own cached 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

No active review issues are recorded for the mini-cluster cache-isolation change.

No open issues 🎉

What changed in this PR

Prevents backward-compatibility tests from reusing a stopped mini cluster’s cached connection services when a ZooKeeper port is reused.

Changes:

  • Adds a unique principal to each mini cluster’s current-client URL to isolate cache entries.
  • Leaves the old-client URL and production code unchanged.
File Description
phoenix-core/​src/​it/​java/​org/​apache/​phoenix/​end2end/​BackwardCompatibilityIT.java Adds a unique principal and explains the cache-isolation behavior.

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 49bb6d9 into apache:master Dec 5, 2026
8 of 13 checks passed
asf-gitbox-commits pushed a commit that referenced this pull request Dec 5, 2026
… a ZK port is reused (#2714)

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
… a ZK port is reused (#2714)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Andrew Purtell <apurtell@salesforce.com>
@apurtell
apurtell deleted the PHOENIX-8082 branch December 5, 2026 06:47
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