Skip to content

PHOENIX-8112 PhoenixTableLevelMetricsIT slow scanner test races the query timeout - #2744

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

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

Conversation

@apurtell

@apurtell apurtell commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

The slow scanner test for table-level metrics fails now and then because the delayed scan does not time out. The test delays the region server scanner by only a millisecond more than the query timeout. The client waits for each scan with a timed wait. If the scan completes before the waiting thread wakes up, the client gets the result and sees no timeout. A result that arrives just after the deadline is valid, so the product behaves as designed.

This change is test-only. The scan delay is now well past the query timeout, so the client always times out first. The test takes no longer, because the client stops at the deadline.

🤖 Generated with Claude Code

…uery timeout

The slow scanner test delays the scan by the query timeout plus one
millisecond. A result that arrives just after the deadline can still be
returned, and the expected timeout does not occur. Delay the scan by five
seconds more than the query timeout.

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 actionable issues were found in the reviewed test delay and comment changes.

No open issues 🎉

What changed in this PR

This test-only change reduces flakiness in Phoenix’s table-level metrics slow-scanner timeout test.

Changes:

  • Increases the scanner delay margin beyond the query timeout from 1 millisecond to 5 seconds.
  • Updates the comment to explain the margin for delayed client-thread wakeups.
File Description
phoenix-core/​src/​it/​java/​org/​apache/​phoenix/​monitoring/​PhoenixTableLevelMetricsIT.java Increases the slow-scanner delay and documents its purpose.

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)

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