apurtell opened a new pull request, #2450: URL: https://github.com/apache/phoenix/pull/2450
`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` 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 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]
