Andrew Kyle Purtell created PHOENIX-7833:
--------------------------------------------
Summary: CDCBaseIT/CDCQueryIT keep manual edge installed after
applyMutations
Key: PHOENIX-7833
URL: https://issues.apache.org/jira/browse/PHOENIX-7833
Project: Phoenix
Issue Type: Sub-task
Components: test
Reporter: Andrew Kyle Purtell
Assignee: Andrew Kyle Purtell
Fix For: 5.4.0, 5.3.1
{{CDCBaseIT.applyMutations}} installs a {{ManualEnvironmentEdge}} so each
{{addChange}} pins {{EnvironmentEdgeManager.currentTimeMillis()}} to the row's
{{{}changeTS{}}}, then calls {{committer.reset()}} whose default implementation
is {{{}EnvironmentEdgeManager.reset(){}}}, reverting {{currentTimeMillis()}} to
the wall clock. The rest of the CDC test body easily takes longer than
{{{}CDCQueryIT.MAX_LOOKBACK_AGE = 10s{}}}, so any SCN-bounded read whose
smallest SCN is the earliest {{changeTS}} trips {{QueryCompiler.verifySCN}}
with {{ERROR 538 "Cannot use SCN to look further back in the past beyond the
configured max lookback age".}} The {{IndexTool}} mapper shares the same
{{EnvironmentEdgeManager}} static state in the in-process mini-cluster and
{{PhoenixServerBuildIndexInputFormat}} hits the same {{ERROR 538}} while
compiling its SCN-bounded plan. The fix stops calling {{committer.reset()}} at
the end of {{{}applyMutations{}}}, instead pinning {{injectEdge}} to the
highest {{changeTS}} seen across all batches so subsequent SCN-bounded reads of
the just-applied mutations stay inside the max-lookback window, and adds a
{{CDCQueryIT.afterTest()}} that calls {{EnvironmentEdgeManager.reset()}} to
preserve per-test isolation.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)