Skip to content

PHOENIX-7828 De-flake UCFWithDisabledIndexIT#2445

Open
apurtell wants to merge 1 commit intoapache:masterfrom
apurtell:PHOENIX-7828
Open

PHOENIX-7828 De-flake UCFWithDisabledIndexIT#2445
apurtell wants to merge 1 commit intoapache:masterfrom
apurtell:PHOENIX-7828

Conversation

@apurtell
Copy link
Copy Markdown
Contributor

@apurtell apurtell commented May 1, 2026

UCFWithDisabledIndexIT was flaky due to two independent races.

First, the tests swap MetaDataEndpointImpl on SYSTEM.CATALOG with a TestMetaDataEndpointImpl that throws DoNotRetryIOException("Not allowed") on every getTable RPC, but TestUtil.addCoprocessor() only polls until the master TableDescriptor is updated and does not wait for region servers to reopen SYSTEM.CATALOG with the new coprocessor. This creates five race sites where client work runs before the swap is visible.

Second, testUcfWithNoGetTableCalls created its data table with UPDATE_CACHE_FREQUENCY=20000, then performed 7 DDLs and 7 UPSERTs before a final SELECT that is expected to be served entirely from the client metadata cache. Whenever wall-clock delay between CREATE TABLE and the SELECT exceeded 20 s the cache expired, a getTable RPC was issued, and the stub rejected it.

Add a waitForCoprocessorOnSystemCatalog(Class) helper that polls region.getCoprocessorHost().findCoprocessor(className) on every SYSTEM.CATALOG region (up to 10 s) and call it after each of the five swaps.

Change testUcfWithNoGetTableCalls's CREATE TABLE from UPDATE_CACHE_FREQUENCY=20000 to UPDATE_CACHE_FREQUENCY=NEVER, which decouples the assertion from wall-clock time.

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.

1 participant