apurtell opened a new pull request, #2445:
URL: https://github.com/apache/phoenix/pull/2445
`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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]