Skip to content

PHOENIX-8119 HA test clusters should not use the fast path RPC call queue - #2751

Open
apurtell wants to merge 1 commit into
apache:masterfrom
apurtell:PHOENIX-8119
Open

apurtell wants to merge 1 commit into
apache:masterfrom
apurtell:PHOENIX-8119

Conversation

@apurtell

@apurtell apurtell commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

HighAvailabilityGroup2IT and other HA tests fail at random on the GitHub runners when a connection setup scan of SYSTEM.LOG times out. The region server receives the scan, but no handler runs it until the client gives up.

This is a known lost wakeup race in the HBase fast path call queue (HBASE-16063). An idle handler and a new call can miss each other, and the call then waits in the queue until another call arrives. The HA test clusters run few handlers at a light load, so nothing else arrives in time.

The HA test utility now configures the deadline queue type for the default call queue of its clusters. That queue does not use the fast path handoff, so a waiting handler always sees a new call. The priority and replication queues keep their fast path executors. The failing scan goes to the default queue, so this change covers it. The change is test only.

🤖 Generated with Claude Code

…ueue

The HA test utility runs each region server with five request handlers.
The default call queue of HBase hands a call directly to a parked
handler. This fast path handoff can lose a wakeup (HBASE-16063). A call
then stays in the queue while all handlers are idle, until another call
arrives. Under a light load, the wait can exceed the client RPC timeout,
and the test fails.

The HA test utility now sets the deadline call queue type. HBase then
builds the default executor without the fast path, and an idle handler
always takes a queued call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@apurtell
apurtell requested a balanced review from Copilot December 4, 2026 20:10

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@apurtell

apurtell commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

Self-review (Claude Code, pr-review-toolkit) — Copilot could not review this PR because of a review quota limit, so this is an automated self-review in its place.

Suggestions

  • The new setting only takes the default call queue off the fast path (HighAvailabilityTestingUtility.java:671). In HBase 2.5 and 2.6 the priority, replication and meta transition executors are still built as fast path FIFO executors, whatever queue type is set. The priority executor serves meta lookups, and this harness gives it only two handlers, so the same lost wakeup can still delay meta lookups during connection setup. The code comment already says "default call queue". Consider saying the same in the PR description. If timeouts later show up on meta lookups, a meta read share above zero would take the priority executor off the fast path too.

Strengths

  • The change is small and test only. It sits in the shared HA mini cluster configuration, so every HA IT gets it without any change to product code.
  • I checked it against the HBase 2.5 and 2.6 schedulers. With no read share set, the deadline queue type gives a plain balanced executor with no fast path handoff. The Phoenix scheduler factory passes the same configuration to the HBase delegate, so the setting takes effect.
  • The failing SYSTEM.LOG scan goes to the default executor, so the change covers the path that failed. Phoenix's own index and metadata executors already use the plain balanced executor, so queue behavior across the cluster is now more consistent.
  • It uses the HBase constants instead of string literals. The new comment explains the reason for the setting in short, design-level sentences.
  • Not adding a regression test is the right call. The defect is a timing race inside HBase, and a test cannot reproduce it reliably.

Recommendation: merge after nits

🤖 Generated with Claude Code

@apurtell

apurtell commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

Response to the self-review (Claude Code):

  • Default call queue only. Agreed. The PR description now says that the setting changes only the default call queue, and that the priority and replication queues keep their fast path executors. The failing SYSTEM.LOG scan goes to the default queue, so this change covers the failure that CI shows.
  • Meta lookups on the priority executor. No failure in the CI runs or the local runs points to a stall on a meta lookup. So the PR does not set a meta read share. If such a stall shows up later, a meta read share above zero is the next step, because it also takes the priority executor off the fast path.

No code change is needed for this review.

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