Skip to content

PHOENIX-8105 QueryLoggerIT fixed clock expires server calls - #2737

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

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

Conversation

@apurtell

@apurtell apurtell commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Three query logger tests failed together in CI, because they found no query log rows. The region server log shows that it drops timed-out calls. One test injects a fixed clock at a very small time value. This clock also applies to HBase, because the mini-cluster runs in the same JVM. Thus the RPC server computes call deadlines from this clock. After the test resets the clock, these deadlines are far in the past, and the server drops the calls. The dropped call is most likely the asynchronous query log write, and it blocks the log writer for later tests.

The change is test-only. The fixed clock now starts at the current time, so the reset moves the clock forward only a little. The start time check stays exact.

🤖 Generated with Claude Code

The test injects a fixed clock that starts at 100. The clock also drives the
server, so server call deadlines are far in the past after the reset, and
the server drops the call that writes the query log. Start the clock at the
current time and compare the start time with the clock.

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

The review identifies no active issues in the test-only clock initialization and timestamp assertion changes.

No open issues 🎉

What changed in this PR

This test-only change addresses query logger CI failures caused by resetting a fixed clock shared with the HBase mini-cluster.

Changes:

  • Initialize the fixed clock from the current time to avoid a large clock jump on reset.
  • Preserve the exact query start-time assertion using the injected clock value.
File Description
phoenix-core/​src/​it/​java/​org/​apache/​phoenix/​end2end/​QueryLoggerIT.java Updates fixed-clock initialization, explains the server impact, and adjusts the timestamp assertion.

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.

  • The HA connection test changes the cluster role while the connection to the second cluster is still opening. PHOENIX-8090 HA parallel connection tests wait for both cluster connections #2722 makes the test wait for both connections first.
  • After a table split, the region server of this test can deadlock. Its request handlers wait for metadata lookups that are queued in a small connection thread pool, and the threads of that pool wait for the same handlers. This is a Phoenix problem on master, and a fix will follow under a new JIRA.
  • The test coverage check also lists test classes that did not run, because another job of this run failed before it ran them.
  • The test coverage check fails on master for every change that runs the integration tests. Two region move variants of SortOrderIT run in two jobs, because the test runner also matches the test category of their parent class. PHOENIX-8104 ParallelStatsDisabledTest execution runs NeedsOwnMiniClusterTest cases twice #2736 fixes the test selection.

(Claude Code)

@apurtell

apurtell commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

Update to the precommit note above: the region server deadlock after a table split is now PHOENIX-8121, with the fix in #2753. The metadata call for one table now runs on the caller thread, so it does not wait in the connection thread pool.

(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