Skip to content

PHOENIX-7829 TaskRegionObserver.SelfHealingTask runs unexpectedly during tests - #2446

Open
apurtell wants to merge 3 commits into
apache:masterfrom
apurtell:PHOENIX-7829
Open

apurtell wants to merge 3 commits into
apache:masterfrom
apurtell:PHOENIX-7829

Conversation

@apurtell

@apurtell apurtell commented May 1, 2026 •

Copy link
Copy Markdown
Contributor

TaskRegionObserver.SelfHealingTask runs unexpectedly during tests, adding unexpected entries to SYSTEM.TASK and perturbing metrics, causing assertions to fail.

Make TaskRegionObserver.SelfHealingTask off-by-default for all Phoenix mini-cluster ITs by disabling its scheduling in BaseTest. Expose a TestUtil helper for tests that require this task to run.

@apurtell apurtell changed the title PHOENIX-7829 IndexMetadataIT.testAsyncRebuildAll filter SYSTEM.TASK queries to test's table PHOENIX-7829 TaskRegionObserver.SelfHealingTask runs unexpectedly during tests Jun 29, 2026
@apurtell
apurtell requested a review from palashc June 29, 2026 18:31
@apurtell

Copy link
Copy Markdown
Contributor Author

I replaced the earlier PR with a more general solution after finding the root cause is common to several tests and a number of other tests seem to know about the problem based on their test setup configurations.

@palashc

palashc commented Jun 30, 2026 •

Copy link
Copy Markdown
Contributor

apurtell and others added 3 commits November 24, 2026 07:47
…ing tests

Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
The histogram check adds GLOBAL_QUERY_TIME to the table RESULT_SET_TIME_MS
and expects the sum to match the latency histogram max. GLOBAL_QUERY_TIME
is a JVM-wide counter. The mini cluster runs in the same JVM, so any
server-side query, such as the SYSTEM.TASK self-healing query, can add to
it while the delayed test scan is open. Then the strict check fails.

The histogram records the table SELECT_SQL_QUERY_TIME plus the table
RESULT_SET_TIME_MS. Read the query time from the table metrics, so the
check counts only the test's own query.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@apurtell

Copy link
Copy Markdown
Contributor Author

Update (force-pushed f35a1b91aa):

  • Rebased onto current master (727aaf0518).
  • The first commit now also opts five test classes back into the self-healing task by setting TASK_HANDLING_INITIAL_DELAY_MS to 1: Bson5IT, CDCStream2IT, VarBinaryEncoded2IT, VarBinaryEncodedIndexUpsertSelectIT and TransformMonitorExtendedIT. Each one waits for state that only the task produces. A CDC stream must reach ENABLED, and the SYSTEM.CDC_STREAM rows must exist before IndexCDCConsumer applies EVENTUAL index mutations. A transform must move off CREATED. With the new BaseTest default these classes failed in a full mvn verify run on HBase 2.5. They passed before the change. The passing EVENTUAL index ITs already set this value.
  • No other changes.

(Posted by Claude Code on behalf of @apurtell.)

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