tkhurana opened a new pull request, #2566: URL: https://github.com/apache/phoenix/pull/2566
## Summary Index tables no longer generate their own replication-log records. The active ships only the data-table record plus a per-`(row, ts)` **PRE_IMAGE** (the prior row state observed at lock time), and the standby regenerates every index entry from that record on the replay path. This targets the `PHOENIX-7562-feature-new` feature branch (builds on the per-batch coalescing / cell-oriented log format, #2540). ## Why - **Out-of-order replay safety.** Because each replicated batch carries the exact prior-row snapshot it was built against, the standby derives each `(row, ts)` group's next state from its own shipped pre-image instead of a region scan. Shard files can be replayed in any order or in parallel; each group is an independent reproduction of the active `preBatchMutate`. - **Cross-cluster rowkeys.** CDC/global/local index rowkeys can embed the encoded data-table region name (`PARTITION_ID`), which differs between clusters. Replicating index cells verbatim would carry the active's region name; the standby instead rebuilds the rowkey with its own. ## Main changes - **Cell-oriented replication format** (codec + record + `MutationCellGrouper`) carrying data cells plus one METAFAMILY pre-image cell per row. - **`IndexRegionObserver`**: active-side pre-image capture; a forked standby replay path (`prepareReplicatedIndexMutations`) that groups by `(row, ts)` and builds index updates from the shipped pre-image. - **`PreImageLocalTable`**: a `LocalHBaseState` serving the local-index builder's prior-row-state from the shipped pre-image instead of a region scan; new `IndexBuildManager.getIndexUpdates` overload accepts it. - **`ReplicationLogProcessor`**: replay a record as one indivisible batch; do not retry `DoNotRetryIOException`. ## Test coverage Global, local, uncovered, atomic, conditional-TTL, and CDC (plain and behind an EVENTUAL secondary index) index regeneration; concurrent/out-of-order replay for both global and local indexes; unit tests for `(row, ts)` grouping isolation and Put/Delete decomposition. ## Notes - Squashed into a single commit. - Please squash-merge. -- 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]
