[ 
https://issues.apache.org/jira/browse/PHOENIX-7828?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrew Kyle Purtell updated PHOENIX-7828:
-----------------------------------------
    Summary: De-flake UCFWithDisabledIndexIT  (was: UCFWithDisabledIndexIT wait 
for coprocessor swap)

> De-flake UCFWithDisabledIndexIT
> -------------------------------
>
>                 Key: PHOENIX-7828
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-7828
>             Project: Phoenix
>          Issue Type: Sub-task
>          Components: test
>            Reporter: Andrew Kyle Purtell
>            Assignee: Andrew Kyle Purtell
>            Priority: Minor
>             Fix For: 5.4.0, 5.3.1
>
>
> {{UCFWithDisabledIndexIT}} was flaky due to two independent races.
> First, the tests swap {{MetaDataEndpointImpl}} on {{SYSTEM.CATALOG}} with a 
> {{TestMetaDataEndpointImpl}} that throws {{DoNotRetryIOException }}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 message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to